From ee4e3a616863880f594504ea3aa9ce619e71dee9 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Mon, 14 Apr 2014 19:43:12 +0400 Subject: [PATCH] Use the new official gamelog output function in soundsense-season. --- scripts/soundsense-season.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/soundsense-season.lua b/scripts/soundsense-season.lua index c2b57e35e..97e07903e 100644 --- a/scripts/soundsense-season.lua +++ b/scripts/soundsense-season.lua @@ -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