v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Editing User:Fleeting Frames/UnsuspendSelectedBuilding
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 33: | Line 33: | ||
end | end | ||
− | function AnnounceEnd( | + | function AnnounceEnd(bld) |
dfhack.gui.makeAnnouncement( | dfhack.gui.makeAnnouncement( | ||
df.announcement_type.QUOTA_FILLED, | df.announcement_type.QUOTA_FILLED, | ||
{D_DISPLAY = true}, | {D_DISPLAY = true}, | ||
xyz2pos(bld.centerx,bld.centery, bld.z), | xyz2pos(bld.centerx,bld.centery, bld.z), | ||
− | " | + | "Completed building " .. utils.getBuildingName(bld) .. ".", |
COLOR_GREEN, | COLOR_GREEN, | ||
true) | true) | ||
Line 58: | Line 58: | ||
if bldjob then | if bldjob then | ||
local myBldStr=tostring(bld) | local myBldStr=tostring(bld) | ||
− | |||
if(watchedbuildings[myBldStr] ~= false) then --don't set repeatfunc when there's already one | if(watchedbuildings[myBldStr] ~= false) then --don't set repeatfunc when there's already one | ||
repeatfunction( | repeatfunction( | ||
function() | function() | ||
− | if(watchedbuildings[myBldStr]) then | + | if(watchedbuildings[myBldStr]) then |
local bld = df.building.find(watchedbuildings[myBldStr]) | local bld = df.building.find(watchedbuildings[myBldStr]) | ||
local bldjob = bld and getConstructionJob(bld) | local bldjob = bld and getConstructionJob(bld) | ||
− | if bld and bldjob | + | if bld and bldjob then |
bldjob.flags.suspend=false | bldjob.flags.suspend=false | ||
− | return true | + | if bld.flags.exists == false then |
+ | return true | ||
+ | end | ||
end | end | ||
end | end | ||
− | + | watchedbuildings[tostring(bld)] = nil --if didn't return, end is at hand | |
− | + | AnnounceEnd(bld) | |
− | AnnounceEnd( | ||
end | end | ||
) | ) |