mod-wdata/init.lua

22 lines
330 B
Lua
Raw Normal View History

2021-05-28 07:12:23 +02:00
2021-05-28 09:24:10 +02:00
wdata = {}
wdata.modname = core.get_current_modname()
wdata.modpath = core.get_modpath(wdata.modname)
2021-05-28 07:12:23 +02:00
2021-05-28 09:24:10 +02:00
function wdata.log(lvl, msg)
2021-05-28 07:12:23 +02:00
if not msg then
msg = lvl
lvl = nil
end
2021-05-28 09:24:10 +02:00
msg = "[" .. wdata.modname .. "] " .. msg
2021-05-28 07:12:23 +02:00
if not lvl then
core.log(msg)
else
core.log(lvl, msg)
end
end
2021-05-28 09:24:10 +02:00
dofile(wdata.modpath .. "/api.lua")