diff options
Diffstat (limited to 'advtrains')
-rw-r--r-- | advtrains/advtrains/init.lua | 6 | ||||
-rw-r--r-- | advtrains/advtrains/settingtypes.txt | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/advtrains/advtrains/init.lua b/advtrains/advtrains/init.lua index c8c4b56..11824f7 100644 --- a/advtrains/advtrains/init.lua +++ b/advtrains/advtrains/init.lua @@ -34,8 +34,10 @@ local function print_concat_table(a) end return str end ---atprint=function() end -atprint=function(t, ...) minetest.log("action", "[advtrains]"..print_concat_table({t, ...})) minetest.chat_send_all("[advtrains]"..print_concat_table({t, ...})) end +atprint=function() end +if minetest.setting_getbool("advtrains_debug") then + atprint=function(t, ...) minetest.log("action", "[advtrains]"..print_concat_table({t, ...})) minetest.chat_send_all("[advtrains]"..print_concat_table({t, ...})) end +end sid=function(id) return string.sub(id, -4) end dofile(advtrains.modpath.."/helpers.lua"); diff --git a/advtrains/advtrains/settingtypes.txt b/advtrains/advtrains/settingtypes.txt new file mode 100644 index 0000000..74a775e --- /dev/null +++ b/advtrains/advtrains/settingtypes.txt @@ -0,0 +1,2 @@ +# Whether to print debug information on advtrains to chat and debug.txt +advtrains_debug (Print advtrains debug messages) bool false
\ No newline at end of file |