From 9ad8d767b4fcf0946444469d2c4072d46997b7e6 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 6 May 2012 19:09:11 +0400 Subject: Add code for adding abstract buildings and removing constructions. --- Lua API.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index 094b522c..7aa8e651 100644 --- a/Lua API.html +++ b/Lua API.html @@ -1126,6 +1126,11 @@ height, rect_area, true_area. Returned width and height are the final values used by the building; true_area is less than rect_area if any tiles were removed from designation.

+
  • dfhack.buildings.constructAbstract(building)

    +

    Links a fully configured object created by allocInstance into the +world. The object must be an abstract building, i.e. a stockpile or civzone. +Returns true, or false if impossible.

    +
  • dfhack.buildings.constructWithItems(building, items)

    Links a fully configured object created by allocInstance into the world for construction, using a list of specific items as material. @@ -1139,6 +1144,10 @@ and possibly destroyed in any case. Use a negative quantity field value to auto-compute the amount from the size of the building.

  • +
  • dfhack.buildings.deconstruct(building)

    +

    Destroys the building, or queues a deconstruction job. +Returns true if the building was destroyed and deallocated immediately.

    +
  • More high-level functions are implemented in lua and can be loaded by require('dfhack.buildings'). See hack/lua/dfhack/buildings.lua.

    @@ -1152,6 +1161,11 @@ a planned but not completed construction there, changes its type. Returns true, or false if obstructed. Note that designated constructions are technically buildings.

    +
  • dfhack.constructions.designateRemove(pos), or designateRemove(x,y,z)

    +

    If there is a construction or a planned construction at the specified +coordinates, designates it for removal, or instantly cancels the planned one. +Returns true, was_only_planned if removed; or false if none found.

    +
  • -- cgit v1.2.1