Document new Units API functions from #1297

develop
lethosor 2018-06-14 10:37:31 -04:00
parent aac892c560
commit 808e795960
1 changed files with 15 additions and 2 deletions

@ -1183,14 +1183,27 @@ Units module
Finds (or creates if requested) a misc trait object with the given id. 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)`` * ``dfhack.units.isAlive(unit)``
The unit isn't dead or undead. 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)`` * ``dfhack.units.isSane(unit)``
The unit is capable of rational action, i.e. not dead, insane, zombie, or active werewolf. The unit is capable of rational action, i.e. not dead, insane, zombie, or active werewolf.