summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-03-02 04:08:42 +0100
committerRealBadAngel <mk@realbadangel.pl>2013-03-02 04:08:42 +0100
commitcc06004381d026e9fb72caafc5bea72dfe14ca9b (patch)
tree71197cdbbe1abe9f71e0d863e208f38a6c190798
parent310cdb06ad3c2db5ca9114da3441413047fa7922 (diff)
UI update
-rw-r--r--unified_inventory/api.lua3
-rw-r--r--unified_inventory/sounds/trash.oggbin0 -> 17600 bytes
-rw-r--r--unified_inventory/sounds/trash_all.oggbin0 -> 18294 bytes
3 files changed, 3 insertions, 0 deletions
diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua
index eec1f13..4eb430f 100644
--- a/unified_inventory/api.lua
+++ b/unified_inventory/api.lua
@@ -94,6 +94,8 @@ unified_inventory.trash = minetest.create_detached_inventory("trash", {
end,
on_put = function(inv, listname, index, stack, player)
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,
})
unified_inventory.trash:set_size("main", 1)
@@ -344,6 +346,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local inventory = {}
player:get_inventory():set_list("main", inventory)
minetest.chat_send_player(player_name, 'Inventory Cleared!')
+ minetest.sound_play("trash_all", {to_player=player_name, gain = 1.0})
end
-- Inventory page controls
diff --git a/unified_inventory/sounds/trash.ogg b/unified_inventory/sounds/trash.ogg
new file mode 100644
index 0000000..3f05e38
--- /dev/null
+++ b/unified_inventory/sounds/trash.ogg
Binary files differ
diff --git a/unified_inventory/sounds/trash_all.ogg b/unified_inventory/sounds/trash_all.ogg
new file mode 100644
index 0000000..0ba67bf
--- /dev/null
+++ b/unified_inventory/sounds/trash_all.ogg
Binary files differ