2021-05-07 02:32:24 +02:00
|
|
|
|
2021-05-08 20:42:35 +02:00
|
|
|
sneeker = {}
|
2021-05-08 21:23:00 +02:00
|
|
|
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
|
|
|
|
|
2021-05-08 21:23:00 +02:00
|
|
|
local scripts = {
|
|
|
|
"settings",
|
|
|
|
"tnt_function",
|
|
|
|
"spawn",
|
2021-07-20 02:49:39 +02:00
|
|
|
"entity",
|
2021-05-08 21:23:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
for _, script in ipairs(scripts) do
|
|
|
|
dofile(sneeker.modpath .. "/" .. script .. ".lua")
|
|
|
|
end
|