37 lines
850 B
Plaintext
37 lines
850 B
Plaintext
|
local log = false
|
||
|
|
||
|
function get_log()
|
||
|
if (log == false) and (dph_debug_log) then
|
||
|
local log_config = {
|
||
|
["file"] = "dph_zcp.log",
|
||
|
["targets"] = {
|
||
|
-- ["log"] = 1,
|
||
|
["gamelog"] = 1,
|
||
|
}
|
||
|
}
|
||
|
local modules = {
|
||
|
"loot",
|
||
|
"integration",
|
||
|
"population",
|
||
|
"civilwar",
|
||
|
"smart",
|
||
|
"simboard",
|
||
|
"anomalies"
|
||
|
}
|
||
|
log = dph_debug_log.new(log_config, modules)
|
||
|
if (smr_amain_mcm.get_config("smr_debug_log")) then
|
||
|
log.enable()
|
||
|
end
|
||
|
end
|
||
|
return log
|
||
|
end
|
||
|
|
||
|
function on_option_change()
|
||
|
if smr_amain_mcm.get_config("smr_debug_log") then
|
||
|
log.enable()
|
||
|
else
|
||
|
log.disable()
|
||
|
end
|
||
|
end
|
||
|
|
||
|
RegisterScriptCallback("on_option_change", on_option_change)
|