aboutsummaryrefslogtreecommitdiff
path: root/advtrains/init.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2017-01-02 13:49:20 +0100
committerorwell96 <orwell@bleipb.de>2017-01-02 13:49:20 +0100
commit8784ee41ddac2959c4a2aca6dd1a5e7570ad741b (patch)
tree1089b3c9266f34398b8a7ed006f36ff7dfa53bc6 /advtrains/init.lua
parent987cd5b7f0ef86884858a107cc915f548675f2a8 (diff)
downloadadvtrains-8784ee41ddac2959c4a2aca6dd1a5e7570ad741b.tar.gz
advtrains-8784ee41ddac2959c4a2aca6dd1a5e7570ad741b.tar.bz2
advtrains-8784ee41ddac2959c4a2aca6dd1a5e7570ad741b.zip
Do not duplicate definitions of 'print' in every file
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r--advtrains/init.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua
index 41b624e..33aa962 100644
--- a/advtrains/init.lua
+++ b/advtrains/init.lua
@@ -4,10 +4,8 @@ advtrains={}
advtrains.modpath = minetest.get_modpath("advtrains")
---print=function(text)
--- minetest.log("action", tostring(text) or "<non-string>")
---end
-print = function(t) minetest.log("action", t) minetest.chat_send_all(t) end
+print=function(t, ...) minetest.log("action", table.concat({t, ...}, " ")) minetest.chat_send_all(table.concat({t, ...}, " ")) end
+sid=function(id) return string.sub(id, -4) end
dofile(advtrains.modpath.."/helpers.lua");
dofile(advtrains.modpath.."/debugitems.lua");