dfhack/scripts/unsuspend.rb

21 lines
440 B
Ruby

2015-08-15 21:15:11 -06:00
# un-suspend construction jobs, one time only
# same as "resume all"
2015-08-15 00:43:50 -06:00
2015-02-14 20:53:06 -07:00
joblist = df.world.job_list.next
count = 0
while joblist
job = joblist.item
joblist = joblist.next
if job.job_type == :ConstructBuilding
if (job.flags.suspend && job.items && job.items[0])
item = job.items[0].item
job.flags.suspend = false
count += 1
end
end
end
puts "Unsuspended #{count} job(s)."