Open chdoc opened 1 week ago
Update: I now have a Lua script based on this that watches for units with high focus penalties for "Drink Alcohol" or "Eat Good Meal" (usually happens with citizen/resident Necromancers) and creates Drink
or Eat
jobs for them.
I ran
local utils = require('utils')
for _,job in utils.listpairs(df.global.world.jobs.list) do
local success = dfhack.job.removePostings(job,true)
end
(and also without the true
) on one of my forts. This seems to correctly delete all job postings. On unpause, the game will happily restore postings for all jobs that need them (i.e. neither suspended nor having a worker assigned)
This adds a factory for general references and uses it in the
Job
module. SimilaraddGeneralRef
wrappers can probably be added to theUnit
andBuildings
modules.