Schematics: Add per-node force placement option
This commit is contained in:
@@ -331,6 +331,19 @@ bool getintfield(lua_State *L, int table,
|
||||
return got;
|
||||
}
|
||||
|
||||
bool getintfield(lua_State *L, int table,
|
||||
const char *fieldname, u8 &result)
|
||||
{
|
||||
lua_getfield(L, table, fieldname);
|
||||
bool got = false;
|
||||
if(lua_isnumber(L, -1)){
|
||||
result = lua_tonumber(L, -1);
|
||||
got = true;
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
return got;
|
||||
}
|
||||
|
||||
bool getintfield(lua_State *L, int table,
|
||||
const char *fieldname, u16 &result)
|
||||
{
|
||||
|
||||
@@ -53,6 +53,8 @@ size_t getstringlistfield(lua_State *L, int table,
|
||||
std::vector<std::string> *result);
|
||||
bool getintfield(lua_State *L, int table,
|
||||
const char *fieldname, int &result);
|
||||
bool getintfield(lua_State *L, int table,
|
||||
const char *fieldname, u8 &result);
|
||||
bool getintfield(lua_State *L, int table,
|
||||
const char *fieldname, u16 &result);
|
||||
bool getintfield(lua_State *L, int table,
|
||||
|
||||
Reference in New Issue
Block a user