init.lua 591 B

12345678910111213141516
  1. local modname = core.get_current_modname()
  2. local prefix = "["..modname.."] "
  3. -- Startup info
  4. core.log("action", prefix.."modname="..dump(modname))
  5. core.log("action", prefix.."modpath="..dump(core.get_modpath(modname)))
  6. core.log("action", prefix.."worldpath="..dump(core.get_worldpath()))
  7. -- Callback info
  8. core.register_on_mods_loaded(function()
  9. core.log("action", prefix.."Callback: on_mods_loaded()")
  10. end)
  11. core.register_on_chatcommand(function(name, command, params)
  12. core.log("action", prefix.."Caught command '"..command.."', issued by '"..name.."'. Parameters: '"..params.."'")
  13. end)