diff --git a/LUA_API.rst b/LUA_API.rst index fc86070c3..673053189 100644 --- a/LUA_API.rst +++ b/LUA_API.rst @@ -663,6 +663,14 @@ Job module Units module ------------ +* ``dfhack.units.getPosition(unit)`` + + Returns true *x,y,z* of the unit; may be not equal to unit.pos if caged. + +* ``dfhack.units.getContainer(unit)`` + + Returns the container (cage) item or *nil*. + * ``dfhack.units.setNickname(unit,nick)`` Sets the unit's nickname properly. @@ -699,6 +707,10 @@ Units module Items module ------------ +* ``dfhack.items.getPosition(item)`` + + Returns true *x,y,z* of the item; may be not equal to item.pos if in inventory. + * ``dfhack.items.getOwner(item)`` Returns the owner unit or *nil*. @@ -708,6 +720,22 @@ Items module Replaces the owner of the item. If unit is *nil*, removes ownership. Returns *false* in case of error. +* ``dfhack.items.getContainer(item)`` + + Returns the container item or *nil*. + +* ``dfhack.items.getContainedItems(item)`` + + Returns a list of items contained in this one. + +* ``dfhack.items.moveToGround(item,pos)`` + + Move the item to the ground at position. Returns *false* if impossible. + +* ``dfhack.items.moveToContainer(item,container)`` + + Move the item to the container. Returns *false* if impossible. + Maps module ----------- diff --git a/Lua API.html b/Lua API.html index 7c3eeddb9..32a3b7f04 100644 --- a/Lua API.html +++ b/Lua API.html @@ -900,6 +900,12 @@ a lua list containing them.

Units module