minetest/games/devtest/mods/log/init.lua

17 lines
591 B
Lua
Raw Normal View History

local modname = core.get_current_modname()
2022-10-08 17:46:03 +02:00
local prefix = "["..modname.."] "
-- Startup info
core.log("action", prefix.."modname="..dump(modname))
core.log("action", prefix.."modpath="..dump(core.get_modpath(modname)))
core.log("action", prefix.."worldpath="..dump(core.get_worldpath()))
2022-10-08 17:46:03 +02:00
-- Callback info
core.register_on_mods_loaded(function()
core.log("action", prefix.."Callback: on_mods_loaded()")
2022-10-08 17:46:03 +02:00
end)
core.register_on_chatcommand(function(name, command, params)
core.log("action", prefix.."Caught command '"..command.."', issued by '"..name.."'. Parameters: '"..params.."'")
end)