mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073)
This commit is contained in:
parent
e7dd9737bd
commit
08ee6d8d4b
25 changed files with 375 additions and 33 deletions
|
@ -136,6 +136,8 @@ void read_item_definition(lua_State* L, int index,
|
|||
int place_param2;
|
||||
if (getintfield(L, index, "place_param2", place_param2))
|
||||
def.place_param2 = rangelim(place_param2, 0, U8_MAX);
|
||||
|
||||
getboolfield(L, index, "wallmounted_rotate_vertical", def.wallmounted_rotate_vertical);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -195,6 +197,8 @@ void push_item_definition_full(lua_State *L, const ItemDefinition &i)
|
|||
lua_setfield(L, -2, "sound_place_failed");
|
||||
lua_pushstring(L, i.node_placement_prediction.c_str());
|
||||
lua_setfield(L, -2, "node_placement_prediction");
|
||||
lua_pushboolean(L, i.wallmounted_rotate_vertical);
|
||||
lua_setfield(L, -2, "wallmounted_rotate_vertical");
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue