mod-sneeker/init.lua

37 lines
655 B
Lua
Raw Permalink Normal View History

2021-05-07 02:32:24 +02:00
2021-05-08 20:42:35 +02:00
sneeker = {}
sneeker.modname = core.get_current_modname()
sneeker.modpath = core.get_modpath(sneeker.modname)
2021-05-07 02:32:24 +02:00
2021-05-08 23:46:27 +02:00
local debugging = core.settings:get_bool("enable_debug_mods", false)
sneeker.log = function(lvl, msg)
if lvl == "debug" and not debugging then return end
if msg == nil then
msg = lvl
lvl = nil
end
msg = "[" .. sneeker.modname .. "] " .. msg
if lvl == "debug" then
msg = "[DEBUG]" .. msg
lvl = nil;
end
if not lvl then
core.log(msg)
else
core.log(lvl, msg)
end
end
local scripts = {
"settings",
"tnt_function",
2021-07-20 02:49:39 +02:00
"entity",
}
for _, script in ipairs(scripts) do
dofile(sneeker.modpath .. "/" .. script .. ".lua")
end