From b53cc059252e1215a2b8412c875ee750d15d38ed Mon Sep 17 00:00:00 2001 From: "A.C.M" Date: Sat, 15 Dec 2018 12:40:39 +0100 Subject: [PATCH] Version and Revision added. --- init.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/init.lua b/init.lua index 85f2c96..bf72553 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,9 @@ local modname = minetest.get_current_modname() local modpath = minetest.get_modpath(modname) +local version = 1 +local revision = 0 + local mod local mat local burn @@ -299,3 +302,15 @@ for _,kind in pairs(material) do end -- if(minetest.registered_nodes end -- for + +minetest.register_chatcommand(modname .. "_version",{ + + params = "<>", + description = "Shows the current Version of " .. modname, + func = function (name) + + minetest.chat_send_player(name, "Mod: " .. modname .. " v " .. version .. "." .. revision .. "\n") + + end -- function + +}) -- chatcommand prospector_version