diff --git a/scripts/gui/advfort.lua b/scripts/gui/advfort.lua index 973a426fc..4f0698ca2 100644 --- a/scripts/gui/advfort.lua +++ b/scripts/gui/advfort.lua @@ -1,8 +1,12 @@ -- allows to do jobs in adv. mode. --[==[ - version: 0.042 + version: 0.043 changelog: + *0.043 + - fixed track carving: up/down was reversed and removed (temp) requirements because they were not working correctly + - added checks for unsafe conditions (currently quite stupid). Should save few adventurers that are trying to work in dangerous conditions (e.g. fishing) + - unsafe checks disabled by "-u" ir "--unsafe" *0.042 - fixed (probably for sure now) the crash bug. - added --clear_jobs debug option. Will delete ALL JOBS! @@ -136,6 +140,8 @@ for k,v in ipairs({...}) do --setting parsing settings.df_assign=false elseif v=="-q" or v=="--quick" then settings.quick=true + elseif v=="-u" or v=="--unsafe" then --ignore pain and etc + settings.unsafe=true elseif v=="-s" or v=="--safe" then settings.safe=true elseif v=="-i" or v=="--inventory" then @@ -412,9 +418,9 @@ function SetCarveDir(args) elseif pos.xfrom_pos.y then - job.item_category[dirs.up]=true - elseif pos.y0 then + dfhack.gui.showAnnouncement("Job: canceled waiting because unsafe -"..k,5,1) + self:cancel_wait() + return + end + end + end + if self.long_wait and self.long_wait_timer==nil then self.long_wait_timer=1000 --TODO tweak this end @@ -1719,8 +1742,8 @@ function usetool:onIdle() if job_ptr and self.long_wait and not job_action then if self.long_wait_timer<=0 then --fix deadlocks with force-canceling of waiting - self.long_wait_timer=nil - self.long_wait=false + self:cancel_wait() + return else self.long_wait_timer=self.long_wait_timer-1 end