mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Schematics: Add per-node force placement option
This commit is contained in:
parent
d59e6ad004
commit
2b99d904f6
7 changed files with 170 additions and 112 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue