document buildingplan Lua API

develop
Myk Taylor 2020-08-15 23:03:49 -07:00
parent 42108a64b9
commit e4a35514ab
2 changed files with 19 additions and 0 deletions

@ -3607,6 +3607,15 @@ Native functions:
``start`` and ``end`` are tables containing positions (see ``start`` and ``end`` are tables containing positions (see
``xyz2pos``). ``name`` is used as the basis for the filename. ``xyz2pos``). ``name`` is used as the basis for the filename.
buildingplan
============
Native functions:
* ``bool isPlannableBuilding(df::building_type type)`` returns whether the building type is handled by buildingplan
* ``void addPlannedBuilding(df::building *bld)`` suspends the building jobs and adds the building to the monitor list
* ``void doCycle()`` runs a check for whether buildlings in the monitor list can be assigned items and unsuspended. This method runs automatically twice a game day, so you only need to call it directly if you want buildingplan to do a check right now.
burrows burrows
======= =======

@ -1,3 +1,13 @@
local _ENV = mkmodule('plugins.buildingplan') local _ENV = mkmodule('plugins.buildingplan')
--[[
Native functions:
* bool isPlannableBuilding(df::building_type type)
* void addPlannedBuilding(df::building *bld)
* void doCycle()
--]]
return _ENV return _ENV