Skip to content

Commit c377890

Browse files
committed
update portrait, sprite, and labors when converting to adult
1 parent f1fb690 commit c377890

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Template for new versions:
4848
- `hfs-pit`: use correct wall types when making pits with walls
4949
- `gui/liquids`: using the remove tool with magma selected will no longer create unexpected unpathable tiles
5050
- `idle-crafting`: do not assign crafting jobs to nobles holding meetings (avoid dangling jobs)
51+
- `rejuvenate`: update unit portrait and sprite when aging up babies and children
52+
- `rejuvenate`: recalculate labor assignments for unit when aging up babies and children (so they can start accepting jobs)
5153

5254
## Misc Improvements
5355
- `hide-tutorials`: handle tutorial popups for adventure mode

rejuvenate.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ function rejuvenate(unit, quiet, force, dry_run, age)
7171
unit.profession2 = df.profession.STANDARD
7272
if hf then hf.profession = df.profession.STANDARD end
7373
end
74+
unit.flags4.portrait_must_be_refreshed = true
75+
unit.flags4.any_texture_must_be_refreshed = true
76+
if dfhack.world.isFortressMode() then
77+
dfhack.units.setAutomaticProfessions(unit)
78+
end
7479
if not quiet then
7580
print(name .. ' is now ' .. age .. ' years old and will live a normal lifespan henceforth')
7681
end

0 commit comments

Comments
 (0)