Use the new official gamelog output function in soundsense-season.

develop
Alexander Gavrilov 2014-04-14 19:43:12 +04:00
parent 7844907204
commit ee4e3a6168
1 changed files with 1 additions and 7 deletions

@ -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