forked from minetest-mods/technic
UI update
This commit is contained in:
parent
310cdb06ad
commit
cc06004381
|
@ -94,6 +94,8 @@ unified_inventory.trash = minetest.create_detached_inventory("trash", {
|
||||||
end,
|
end,
|
||||||
on_put = function(inv, listname, index, stack, player)
|
on_put = function(inv, listname, index, stack, player)
|
||||||
inv:set_stack(listname, index, nil)
|
inv:set_stack(listname, index, nil)
|
||||||
|
local player_name=player:get_player_name()
|
||||||
|
minetest.sound_play("trash", {to_player=player_name, gain = 1.0})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
unified_inventory.trash:set_size("main", 1)
|
unified_inventory.trash:set_size("main", 1)
|
||||||
|
@ -344,6 +346,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
local inventory = {}
|
local inventory = {}
|
||||||
player:get_inventory():set_list("main", inventory)
|
player:get_inventory():set_list("main", inventory)
|
||||||
minetest.chat_send_player(player_name, 'Inventory Cleared!')
|
minetest.chat_send_player(player_name, 'Inventory Cleared!')
|
||||||
|
minetest.sound_play("trash_all", {to_player=player_name, gain = 1.0})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Inventory page controls
|
-- Inventory page controls
|
||||||
|
|
BIN
unified_inventory/sounds/trash.ogg
Normal file
BIN
unified_inventory/sounds/trash.ogg
Normal file
Binary file not shown.
BIN
unified_inventory/sounds/trash_all.ogg
Normal file
BIN
unified_inventory/sounds/trash_all.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user