From 808e795960dac2e44a5d49d9cc21cf5e275c3f37 Mon Sep 17 00:00:00 2001 From: lethosor Date: Thu, 14 Jun 2018 10:37:31 -0400 Subject: [PATCH] Document new Units API functions from #1297 --- docs/Lua API.rst | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/Lua API.rst b/docs/Lua API.rst index 0e5f3330c..46235e1bf 100644 --- a/docs/Lua API.rst +++ b/docs/Lua API.rst @@ -1183,14 +1183,27 @@ Units module Finds (or creates if requested) a misc trait object with the given id. -* ``dfhack.units.isDead(unit)`` +* ``dfhack.units.isActive(unit)`` - The unit is completely dead and passive, or a ghost. + The unit is active (alive and on the map). * ``dfhack.units.isAlive(unit)`` The unit isn't dead or undead. +* ``dfhack.units.isDead(unit)`` + + The unit is completely dead and passive, or a ghost. Equivalent to + ``dfhack.units.isKilled(unit) or dfhack.units.isGhost(unit)``. + +* ``dfhack.units.isKilled(unit)`` + + The unit has been killed. + +* ``dfhack.units.isGhost(unit)`` + + The unit is a ghost. + * ``dfhack.units.isSane(unit)`` The unit is capable of rational action, i.e. not dead, insane, zombie, or active werewolf.