From 9adf310d7f162ba58da764bed2c918487c692f6b Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Tue, 22 May 2012 12:31:37 +0400 Subject: Update Units::isCitizen after looking at game-over detection code. --- Lua API.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index 4b763af2..1576652d 100644 --- a/Lua API.html +++ b/Lua API.html @@ -960,13 +960,20 @@ a lua list containing them.

Returns the nemesis record of the unit if it has one, or nil.

  • dfhack.units.isDead(unit)

    -

    The unit is completely dead and passive.

    +

    The unit is completely dead and passive, or a ghost.

  • dfhack.units.isAlive(unit)

    The unit isn't dead or undead.

  • dfhack.units.isSane(unit)

    -

    The unit is capable of rational action, i.e. not dead, insane or zombie.

    +

    The unit is capable of rational action, i.e. not dead, insane, zombie, or active werewolf.

    +
  • +
  • dfhack.units.isDwarf(unit)

    +

    The unit is of the correct race of the fortress.

    +
  • +
  • dfhack.units.isCitizen(unit)

    +

    The unit is an alive sane citizen of the fortress; wraps the +same checks the game uses to decide game-over by extinction.

  • dfhack.units.getAge(unit[,true_age])

    Returns the age of the unit in years as a floating-point value. -- cgit v1.2.1