|
|
@ -8,7 +8,7 @@ if cmd=="--file" or cmd=="-f" then
|
|
|
|
if f==nil then
|
|
|
|
if f==nil then
|
|
|
|
qerror(err)
|
|
|
|
qerror(err)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
dfhack.pcall(f,table.unpack(args,3))
|
|
|
|
dfhack.safecall(f,table.unpack(args,3))
|
|
|
|
elseif cmd=="--save" or cmd=="-s" then
|
|
|
|
elseif cmd=="--save" or cmd=="-s" then
|
|
|
|
if df.global.world.cur_savegame.save_dir=="" then
|
|
|
|
if df.global.world.cur_savegame.save_dir=="" then
|
|
|
|
qerror("Savefile not loaded")
|
|
|
|
qerror("Savefile not loaded")
|
|
|
@ -19,7 +19,7 @@ elseif cmd=="--save" or cmd=="-s" then
|
|
|
|
if f==nil then
|
|
|
|
if f==nil then
|
|
|
|
qerror(err)
|
|
|
|
qerror(err)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
dfhack.pcall(f,table.unpack(args,3))
|
|
|
|
dfhack.safecall(f,table.unpack(args,3))
|
|
|
|
elseif cmd~=nil then
|
|
|
|
elseif cmd~=nil then
|
|
|
|
-- Support some of the prefixes allowed by dfhack.interpreter
|
|
|
|
-- Support some of the prefixes allowed by dfhack.interpreter
|
|
|
|
local prefix
|
|
|
|
local prefix
|
|
|
|