node with version infos

master
Och Noe 2019-06-02 19:09:46 +02:00
parent 89fbbcc934
commit 3e74e900d3
3 changed files with 59 additions and 0 deletions

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

36
version_info Executable file
View File

@ -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