From b992b04f0bb7ffef8e7fb152967d438f398543d7 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 20 May 2012 21:57:45 +0400 Subject: Remove stuff that shouldn't be in the core, and expose to lua what's left. Specifically, any "if (verbose) { Core::printerr("blah") }" kind of stuff definitely doesn't belong in the common API functions. Also, ref->getUnit() is very expensive. On the other hand, checks for crash-inducing conflicts with the ui should be in the core api, and not in client plugins. --- Lua API.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index e2d4ec23..4b763af2 100644 --- a/Lua API.html +++ b/Lua API.html @@ -991,6 +991,10 @@ or raws. The ignore_noble boolean disables the
  • dfhack.items.getPosition(item)

    Returns true x,y,z of the item, or nil if invalid; may be not equal to item.pos if in inventory.

  • +
  • dfhack.items.getDescription(item, type[, decorate])

    +

    Returns the string description of the item, as produced by the getItemDescription +method. If decorate is true, also adds markings for quality and improvements.

    +
  • dfhack.items.getGeneralRef(item, type)

    Searches for a general_ref with the given type.

  • @@ -1016,6 +1020,12 @@ Returns false in case of error.

  • dfhack.items.moveToContainer(item,container)

    Move the item to the container. Returns false if impossible.

  • +
  • dfhack.items.moveToBuilding(item,building,use_mode)

    +

    Move the item to the building. Returns false if impossible.

    +
  • +
  • dfhack.items.moveToInventory(item,unit,use_mode,body_part)

    +

    Move the item to the unit inventory. Returns false if impossible.

    +
  • -- cgit v1.2.1