From dc632e84781097976b9dce5882a56f11924e2093 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Thu, 24 Sep 2026 15:02:47 -0500 Subject: [PATCH] adjust `full-heal` for `isCitizen` adjustment See DFHack/DFHack#5977 --- changelog.txt | 1 + full-heal.lua | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6c0b99ddd3..ca414e9563 100644 --- a/changelog.txt +++ b/changelog.txt @@ -44,6 +44,7 @@ Template for new versions: - `caravan`: fix doubled "total value of items marked for trade" after toggling filter options, and keep item marks when switching between filter views in the ``Bring goods to depot`` overlay - `combine`: dyes are combined again, but only when their ``dye_profile`` matches, so mixed dyes no longer revert to a component dye - `fix/loyaltycascade`: guard against citizens that are not historical figures and emit a warning. +- `full-heal`: ``--all-citizens`` still matches dead citizens (for resurrection) now that ``dfhack.units.isCitizen`` excludes the dead - `gui/settings-manager`: preserve built-in work details added after saved settings were created - `gui/siegemanager`: fix nil index if there are no siege engines on the map - `hide-tutorials`: also suppress the adventure mode start tutorial (defaults its checkbox to off and dismisses the popups) diff --git a/full-heal.lua b/full-heal.lua index a1daa0fa89..ecd2881325 100644 --- a/full-heal.lua +++ b/full-heal.lua @@ -235,9 +235,12 @@ if args.all then heal(unit,args.r,args.keep_corpse) end elseif args.all_citizens then - -- can't use dfhack.units.getCitizens since we want dead ones too + -- can't use dfhack.units.getCitizens since we want dead ones too; + -- isCitizen/isResident exclude the dead, but dead citizens retain + -- their group membership link for _,unit in ipairs(df.global.world.units.active) do - if dfhack.units.isCitizen(unit, true) or dfhack.units.isResident(unit) then + if dfhack.units.isCitizen(unit, true) or dfhack.units.isResident(unit) or + (dfhack.units.isDead(unit) and dfhack.units.isOwnGroup(unit)) then heal(unit,args.r,args.keep_corpse) end end