mirror of
https://codeberg.org/AntumLuanti/mod-cleaner.git
synced 2025-03-15 04:41:22 +00:00
Add objects & functions for outputting log info
This commit is contained in:
parent
3b02b109f5
commit
9200ed9c20
1 changed files with 20 additions and 0 deletions
20
init.lua
20
init.lua
|
@ -1,3 +1,23 @@
|
|||
--[[ Clean mod
|
||||
License: CC0
|
||||
]]
|
||||
|
||||
|
||||
clean = {}
|
||||
clean.name = core.get_current_modname()
|
||||
|
||||
local debug = core.settings:get_bool('enable_debug_mods')
|
||||
|
||||
local function log(level, msg)
|
||||
core.log(level, '[' .. clean.name .. '] ' .. msg)
|
||||
end
|
||||
|
||||
local function logDebug(msg)
|
||||
if debug then
|
||||
core.log('DEBUG: [' .. clean.name .. '] ' .. msg)
|
||||
end
|
||||
end
|
||||
|
||||
local old_nodes = {}
|
||||
local old_entities = {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue