File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Template for new versions:
3535## Fixes
3636- `gui/quickfort`: only print a help blueprint's text once even if the repeat setting is enabled
3737- `makeown`: quell any active enemy or conflict relationships with converted creatures
38+ - `makeown`: halt any hostile jobs the unit may be engaged in, like kidnapping
3839- `fix/loyaltycascade`: allow the fix to work on non-dwarven citizens
3940- `control-panel`: fix setting numeric preferences from the commandline
4041
Original file line number Diff line number Diff line change @@ -100,6 +100,17 @@ local function sanitize_profession(prof)
100100 return prof_map [prof ] or prof
101101end
102102
103+ local hostile_jobs = utils .invert {
104+ df .job_type .Kidnap ,
105+ df .job_type .HeistItem ,
106+ df .job_type .AcceptHeistItem ,
107+ }
108+
109+ local function cancel_hostile_jobs (job )
110+ if not job or not hostile_jobs [job .job_type ] then return end
111+ dfhack .job .removeJob (job )
112+ end
113+
103114local function fix_unit (unit )
104115 unit .flags1 .marauder = false ;
105116 unit .flags1 .merchant = false ;
@@ -151,6 +162,8 @@ local function fix_unit(unit)
151162 end
152163
153164 clear_enemy_status (unit )
165+
166+ cancel_hostile_jobs (unit .job .current_job )
154167end
155168
156169local function add_to_entity (hf , eid )
You can’t perform that action at this time.
0 commit comments