File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11-- Attempts to fully heal the selected unit
22-- author Kurik Amudnil, Urist DaVinci
3- -- edited by expwnent
3+ -- edited by expwnent and AtomicChicken
44
55--[====[
66
@@ -188,5 +188,18 @@ if unit then
188188 job .completion_timer = 0
189189 job .pos :assign (unit .pos )
190190 end
191+
192+ local job_link = df .global .world .jobs .list .next
193+ while job_link do
194+ local doctor_job = job_link .item
195+ if doctor_job then
196+ local patientRef = dfhack .job .getGeneralRef (doctor_job , df .general_ref_type [' UNIT_PATIENT' ])
197+ if patientRef and patientRef .unit_id == unit .id then
198+ patientRef .unit_id = - 1 -- causes active healthcare job to be cancelled, generating a job cancellation announcement indicating the lack of a patient
199+ break
200+ end
201+ end
202+ job_link = job_link .next
203+ end
191204end
192205
You can’t perform that action at this time.
0 commit comments