diff options
author | Och Noe <och_noe@forksworld.de> | 2019-05-27 14:01:40 +0200 |
---|---|---|
committer | Och Noe <och_noe@forksworld.de> | 2019-05-27 14:01:40 +0200 |
commit | 5694bb1dfb7f167c0c5f185943c19107c5fa4ffc (patch) | |
tree | 5020787599abfb3959a0167cc51629291c1baf11 | |
parent | 5602b46364db2249beb7fa4bc03ebe2489bcc332 (diff) | |
download | advtrains_platform-5694bb1dfb7f167c0c5f185943c19107c5fa4ffc.tar.gz advtrains_platform-5694bb1dfb7f167c0c5f185943c19107c5fa4ffc.tar.bz2 advtrains_platform-5694bb1dfb7f167c0c5f185943c19107c5fa4ffc.zip |
node with version information added
-rw-r--r-- | init.lua | 17 | ||||
-rw-r--r-- | textures/advtrains_platform_version_node.png | bin | 0 -> 697 bytes | |||
-rwxr-xr-x | version_info | 34 |
3 files changed, 51 insertions, 0 deletions
@@ -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 }, + }, + }) + diff --git a/textures/advtrains_platform_version_node.png b/textures/advtrains_platform_version_node.png Binary files differnew file mode 100644 index 0000000..98ade6c --- /dev/null +++ b/textures/advtrains_platform_version_node.png diff --git a/version_info b/version_info new file mode 100755 index 0000000..a24c2ac --- /dev/null +++ b/version_info @@ -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 + + + + |