From f510cd7c11c34d1a8ded74d207d2e9d369a9a008 Mon Sep 17 00:00:00 2001 From: warmist Date: Tue, 13 Jan 2015 10:30:53 +0200 Subject: [PATCH] Update advfort.lua Fix bug with building jobs --- scripts/gui/advfort.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/gui/advfort.lua b/scripts/gui/advfort.lua index 921dd87cf..17aef6a42 100644 --- a/scripts/gui/advfort.lua +++ b/scripts/gui/advfort.lua @@ -1,8 +1,10 @@ -- allows to do jobs in adv. mode. --[==[ - version: 0.011 + version: 0.012 changelog: + *0.012 + - fix for some jobs not finding correct building. *0.011 - fixed crash with building jobs (other jobs might have been crashing too!) - fixed bug with building asking twice to input items @@ -1123,7 +1125,7 @@ function usetool:openShopWindow(building) local filter_pile=workshopJobs.getJobs(building:getType(),building:getSubtype(),building:getCustomType()) if filter_pile then - local state={unit=adv,from_pos={x=adv.pos.x,y=adv.pos.y, z=adv.pos.z,building=building} + local state={unit=adv,from_pos={x=adv.pos.x,y=adv.pos.y, z=adv.pos.z},building=building ,screen=self,bld=building,common=filter_pile.common} choices={} for k,v in pairs(filter_pile) do @@ -1455,4 +1457,4 @@ end if not (dfhack.gui.getCurFocus()=="dungeonmode/Look" or dfhack.gui.getCurFocus()=="dungeonmode/Default") then qerror("This script requires an adventurer mode with (l)ook or default mode.") end -usetool():show() \ No newline at end of file +usetool():show()