mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
Reference in New Issue
Block a user