Fix issues in construction module

develop
Tachytaenius 2022-10-12 21:32:27 +01:00
parent 1cf9688349
commit ded5f483d6
3 changed files with 5 additions and 2 deletions

@ -1912,7 +1912,8 @@ Constructions module
* ``dfhack.constructions.insert(construction)``
Properly inserts the given construction into the game.
Properly inserts the given construction into the game. Returns false and fails to
insert if there was already a construction at the position.
Kitchen module
--------------

@ -2264,6 +2264,7 @@ static const luaL_Reg dfhack_buildings_funcs[] = {
static const LuaWrapper::FunctionReg dfhack_constructions_module[] = {
WRAPM(Constructions, designateNew),
WRAPM(Constructions, insert),
{ NULL, NULL }
};
@ -2286,7 +2287,6 @@ static int constructions_findAtTile(lua_State *L)
static const luaL_Reg dfhack_constructions_funcs[] = {
{ "designateRemove", constructions_designateRemove },
{ "findAtTile", constructions_findAtTile },
WRAPM(Constructions, insert),
{ NULL, NULL }
};

@ -45,6 +45,8 @@ namespace Constructions
DFHACK_EXPORT df::construction * findAtTile(df::coord pos);
DFHACK_EXPORT bool insert(df::construction * constr);
DFHACK_EXPORT bool designateNew(df::coord pos, df::construction_type type,
df::item_type item = df::item_type::NONE, int mat_index = -1);