forked from Mirrorlandia_minetest/minetest
DevTest: Move more logging to log mod
This commit is contained in:
parent
48530ccbc0
commit
3a7fffc587
@ -13,11 +13,4 @@ function experimental.print_to_everything(msg)
|
|||||||
minetest.chat_send_all(msg)
|
minetest.chat_send_all(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("info", "[experimental] modname="..dump(minetest.get_current_modname()))
|
|
||||||
minetest.log("info", "[experimental] modpath="..dump(minetest.get_modpath("experimental")))
|
|
||||||
minetest.log("info", "[experimental] worldpath="..dump(minetest.get_worldpath()))
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_on_mods_loaded(function()
|
|
||||||
minetest.log("action", "[experimental] on_mods_loaded()")
|
|
||||||
end)
|
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
minetest.register_on_chatcommand(function(name, command, params)
|
local modname = minetest.get_current_modname()
|
||||||
minetest.log("action", "[devtest] Caught command '"..command.."', issued by '"..name.."'. Parameters: '"..params.."'")
|
local prefix = "["..modname.."] "
|
||||||
|
|
||||||
|
-- Startup info
|
||||||
|
minetest.log("action", prefix.."modname="..dump(modname))
|
||||||
|
minetest.log("action", prefix.."modpath="..dump(minetest.get_modpath(modname)))
|
||||||
|
minetest.log("action", prefix.."worldpath="..dump(minetest.get_worldpath()))
|
||||||
|
|
||||||
|
-- Callback info
|
||||||
|
minetest.register_on_mods_loaded(function()
|
||||||
|
minetest.log("action", prefix.."Callback: on_mods_loaded()")
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_chatcommand(function(name, command, params)
|
||||||
|
minetest.log("action", prefix.."Caught command '"..command.."', issued by '"..name.."'. Parameters: '"..params.."'")
|
||||||
end)
|
end)
|
||||||
|
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 138 B |
Loading…
Reference in New Issue
Block a user