mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add different place sound for nodes
This commit is contained in:
parent
7d9329ecfe
commit
5e7e0347cd
7 changed files with 47 additions and 8 deletions
|
@ -96,6 +96,14 @@ ItemDefinition read_item_definition(lua_State *L, int index,
|
|||
read_groups(L, -1, def.groups);
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_getfield(L, index, "sounds");
|
||||
if(lua_istable(L, -1)){
|
||||
lua_getfield(L, -1, "place");
|
||||
read_soundspec(L, -1, def.sound_place);
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
// Client shall immediately place this node when player places the item.
|
||||
// Server will update the precise end result a moment later.
|
||||
// "" = no prediction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue