Skip to content

Commit 955db46

Browse files
committed
Move save_dir back into cur_savegame
1 parent 274e7c3 commit 955db46

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

exportlegends.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function export_more_legends_xml()
110110
local year_str = string.format('%0'..math.max(5, string.len(''..df.global.cur_year))..'d', df.global.cur_year)
111111
local date_str = year_str..string.format('-%02d-%02d', month, day)
112112

113-
local filename = df.global.world.save_dir.."-"..date_str.."-legends_plus.xml"
113+
local filename = df.global.world.cur_savegame.save_dir.."-"..date_str.."-legends_plus.xml"
114114
local file = io.open(filename, 'w')
115115
if not file then qerror("could not open file: " .. filename) end
116116

lua.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ if cmd=="--file" or cmd=="-f" then
5353
end
5454
dfhack.safecall(f,table.unpack(args,3))
5555
elseif cmd=="--save" or cmd=="-s" then
56-
if df.global.world.save_dir=="" then
56+
if df.global.world.cur_savegame.save_dir=="" then
5757
qerror("Savefile not loaded")
5858
end
5959
local fname=args[2] or "dfhack.lua"
60-
fname=string.format("data/save/%s/%s",df.global.world.save_dir,fname)
60+
fname=string.format("data/save/%s/%s",df.global.world.cur_savegame.save_dir,fname)
6161
local f,err=loadfile (fname)
6262
if f==nil then
6363
qerror(err)

modtools/extra-gamelog.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function log_on_load(op)
4444
local function fullname(item)
4545
return dfhack.TranslateName(item.name)..' ('..dfhack.TranslateName(item.name ,true)..')'
4646
end
47-
msg('Loaded '..df.global.world.save_dir..', '..fullname(df.global.world.world_data)..
47+
msg('Loaded '..df.global.world.cur_savegame.save_dir..', '..fullname(df.global.world.world_data)..
4848
' at coordinates ('..site.pos.x..','..site.pos.y..')')
4949
msg('Loaded the fortress '..fullname(site)..
5050
(fort_ent and ', colonized by the group '..fullname(fort_ent) or '')..

0 commit comments

Comments
 (0)