node with version information added

master
Och Noe 2019-05-27 14:01:40 +02:00
parent 5602b46364
commit 5694bb1dfb
3 changed files with 51 additions and 0 deletions

View File

@ -290,3 +290,20 @@ end
end
minetest.register_node(own_name..":version_node", {
description = own_name.." version node",
tiles = {own_name.."_version_node.png"},
groups = {cracky = 3,not_in_creative_inventory=1},
})
minetest.register_craft({
output = own_name..":version_node",
recipe = {
{ "advtrains_platform:platform_high_cobble" },
{ "advtrains_platform:platform_high_stone" },
{ adv_track },
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

34
version_info Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
ls -1r *.lua *.txt | head -12 >.filelist
echo "$(date --iso=m) [$(basename "$(realpath . )")]" >.datelist
cat .filelist | while read line ; do
echo "$(date --iso=m -r ${line}) ${line}" >>.datelist
done
anytopnm .datelist >.image
WIDTH=$(head -2 .image | tail -1 | awk '{ print $1 }')
HEIGHT=$(head -2 .image | tail -1 | awk '{ print $2 }')
echo $WIDTH
echo $HEIGHT
if [ $WIDTH -gt $HEIGHT ] ; then
ppmmake white 1 $((WIDTH-HEIGHT)) >.image_temp
pnmcat -tb .image .image_temp >.image2
fi
if [ $WIDTH -lt $HEIGHT ] ; then
ppmmake white $((HEIGHT-WIDTH)) 1 >.image_temp
pnmcat -lr .image .image_temp >.image2
fi
pnmtopng .image2 >textures/advtrains_platform_version_node.png