Skip to content

Commit b4287d7

Browse files
authored
Merge pull request #1643 from DFHack/ab9rf-full-heal-fix-1
adjust `full-heal` for `isCitizen` adjustment
2 parents ccead2e + dc632e8 commit b4287d7

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎changelog.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Template for new versions:
4444
- `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
4545
- `combine`: dyes are combined again, but only when their ``dye_profile`` matches, so mixed dyes no longer revert to a component dye
4646
- `fix/loyaltycascade`: guard against citizens that are not historical figures and emit a warning.
47+
- `full-heal`: ``--all-citizens`` still matches dead citizens (for resurrection) now that ``dfhack.units.isCitizen`` excludes the dead
4748
- `gui/settings-manager`: preserve built-in work details added after saved settings were created
4849
- `gui/siegemanager`: fix nil index if there are no siege engines on the map
4950
- `hide-tutorials`: also suppress the adventure mode start tutorial (defaults its checkbox to off and dismisses the popups)

‎full-heal.lua‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,12 @@ if args.all then
235235
heal(unit,args.r,args.keep_corpse)
236236
end
237237
elseif args.all_citizens then
238-
-- can't use dfhack.units.getCitizens since we want dead ones too
238+
-- can't use dfhack.units.getCitizens since we want dead ones too;
239+
-- isCitizen/isResident exclude the dead, but dead citizens retain
240+
-- their group membership link
239241
for _,unit in ipairs(df.global.world.units.active) do
240-
if dfhack.units.isCitizen(unit, true) or dfhack.units.isResident(unit) then
242+
if dfhack.units.isCitizen(unit, true) or dfhack.units.isResident(unit) or
243+
(dfhack.units.isDead(unit) and dfhack.units.isOwnGroup(unit)) then
241244
heal(unit,args.r,args.keep_corpse)
242245
end
243246
end

0 commit comments

Comments
 (0)