aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOch Noe <och_noe@forksworld.de>2019-06-02 19:09:46 +0200
committerOch Noe <och_noe@forksworld.de>2019-06-02 19:09:46 +0200
commit3e74e900d3fcf42b81f0c6b942413f520d8caa55 (patch)
tree45a31534b53f3763612ab7c56f453088bbf17782
parent89fbbcc93420cbe1e551260c9d36793ddec4a66e (diff)
downloadmoreblocks-3e74e900d3fcf42b81f0c6b942413f520d8caa55.tar.gz
moreblocks-3e74e900d3fcf42b81f0c6b942413f520d8caa55.tar.bz2
moreblocks-3e74e900d3fcf42b81f0c6b942413f520d8caa55.zip
node with version infos
-rw-r--r--init.lua23
-rw-r--r--textures/moreblock_version_node.pngbin0 -> 3177 bytes
-rwxr-xr-xversion_info36
3 files changed, 59 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 8deff58..a46432e 100644
--- a/init.lua
+++ b/init.lua
@@ -36,6 +36,29 @@ dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aliases.lua")
dofile(modpath .. "/panes.lua")
+
+local own_name = "moreblocks"
+
+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 = {
+ { "moreblocks:super_glow_glass" },
+ { "moreblocks:cobble_condensed" },
+ { "moreblocks:circular_saw" },
+ },
+ })
+
+
+
+
+
if minetest.settings:get_bool("log_mods") then
minetest.log("action", S("[moreblocks] loaded."))
end
+
diff --git a/textures/moreblock_version_node.png b/textures/moreblock_version_node.png
new file mode 100644
index 0000000..47ce05a
--- /dev/null
+++ b/textures/moreblock_version_node.png
Binary files differ
diff --git a/version_info b/version_info
new file mode 100755
index 0000000..03f217f
--- /dev/null
+++ b/version_info
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+find *.lua *.txt textures -type f | fgrep -v textures/moreblocks_version_node.png | head -24 >.filelist
+
+echo -n "" >.datelist
+
+cat .filelist | while read line ; do
+ echo "$(date --iso=m -r ${line}) ${line}" >>.datelist
+done
+
+
+
+(echo "$(date --iso=m) [$(basename "$(realpath . )")]" ; cat .datelist | sed 's/ textures/ t/' | sort -r ) | anytopnm >.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/moreblock_version_node.png
+
+
+
+