Make 'print debug messages' a setting
This commit is contained in:
parent
4bc5163787
commit
d73289237e
|
@ -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");
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# Whether to print debug information on advtrains to chat and debug.txt
|
||||
advtrains_debug (Print advtrains debug messages) bool false
|
Loading…
Reference in New Issue