|
|
|
@ -10,18 +10,12 @@ local seasons = {
|
|
|
|
|
|
|
|
|
|
local args = {...}
|
|
|
|
|
|
|
|
|
|
local function write_gamelog(msg)
|
|
|
|
|
local log = io.open('gamelog.txt', 'a')
|
|
|
|
|
log:write(msg.."\n")
|
|
|
|
|
log:close()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if args[1] == 'disable' then
|
|
|
|
|
dfhack.onStateChange[_ENV] = nil
|
|
|
|
|
else
|
|
|
|
|
dfhack.onStateChange[_ENV] = function(op)
|
|
|
|
|
if op == SC_WORLD_LOADED then
|
|
|
|
|
write_gamelog(seasons[df.global.cur_season]..' has arrived on the calendar.')
|
|
|
|
|
dfhack.gui.writeToGamelog(seasons[df.global.cur_season]..' has arrived on the calendar.')
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|