Skip to content

Commit ecfb94a

Browse files
committed
flag check -> function
1 parent 401beac commit ecfb94a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

warn-starving.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function doCheck()
120120
for i=#units-1, 0, -1 do
121121
local unit = units[i]
122122
local rraw = findRaceCaste(unit)
123-
if rraw and not unit.flags1.dead and not dfhack.units.isOpposedToLife(unit) then
123+
if rraw and dfhack.units.isActive(unit) and not dfhack.units.isOpposedToLife(unit) then
124124
table.insert(messages, checkVariable(unit.counters2.hunger_timer, 75000, 'starving', starvingUnits, unit))
125125
table.insert(messages, checkVariable(unit.counters2.thirst_timer, 50000, 'dehydrated', dehydratedUnits, unit))
126126
table.insert(messages, checkVariable(unit.counters2.sleepiness_timer, 150000, 'very drowsy', sleepyUnits, unit))

0 commit comments

Comments
 (0)