revert dup isEnabled and document real isEnabled

develop
Myk Taylor 2020-09-22 23:24:20 -07:00
parent b73750e706
commit 12769de232
3 changed files with 9 additions and 9 deletions

@ -3596,6 +3596,13 @@ to lua contexts. They are automatically imported by
``mkmodule('plugins.<name>')``; this means that a lua
module file is still necessary for ``require`` to read.
In addition to any native functions documented here, plugins that can be
disabled (that is, plugins that support the enable/disable API) will have the
following functions defined:
* ``isEnabled()`` returns whether the plugin is enabled.
* ``setEnabled(boolean)`` sets whether the plugin is enabled.
The following plugins have lua support.
blueprint
@ -3616,9 +3623,8 @@ buildingplan
Native functions:
* ``bool isEnabled()`` returns whether the plugin is enabled.
* ``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.
* ``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

@ -418,10 +418,6 @@ DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_chan
// Lua API section
static bool isEnabled() {
return is_enabled;
}
static bool isPlannableBuilding(df::building_type type) {
return planner.isPlanableBuilding(type);
}
@ -435,7 +431,6 @@ static void doCycle() {
}
DFHACK_PLUGIN_LUA_FUNCTIONS {
DFHACK_LUA_FUNCTION(isEnabled),
DFHACK_LUA_FUNCTION(isPlannableBuilding),
DFHACK_LUA_FUNCTION(addPlannedBuilding),
DFHACK_LUA_FUNCTION(doCycle),

@ -4,7 +4,6 @@ local _ENV = mkmodule('plugins.buildingplan')
Native functions:
* bool isEnabled()
* bool isPlannableBuilding(df::building_type type)
* void addPlannedBuilding(df::building *bld)
* void doCycle()