We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6cdf8c commit 0471d9eCopy full SHA for 0471d9e
rejuvenate.lua
@@ -7,12 +7,9 @@ local DEFAULT_OLD_AGE = 160
7
local ANY_BABY = df.global.world.units.other.ANY_BABY
8
9
local function get_caste_misc(unit)
10
- local cre = df.creature_raw.find(unit.race)
11
- if not cre then return end
12
- if unit.caste < 0 or unit.caste >= #cre.caste then
13
- return
14
- end
15
- return cre.caste[unit.caste].misc
+ local craw = dfhack.units.getCasteRaw(unit)
+ if not craw then return end
+ return craw.misc
16
end
17
18
local function get_adult_age(misc)
0 commit comments