UI update
authorRealBadAngel <mk@realbadangel.pl>
Sat, 2 Mar 2013 03:08:42 +0000 (04:08 +0100)
committerRealBadAngel <mk@realbadangel.pl>
Sat, 2 Mar 2013 03:08:42 +0000 (04:08 +0100)
unified_inventory/api.lua
unified_inventory/sounds/trash.ogg [new file with mode: 0644]
unified_inventory/sounds/trash_all.ogg [new file with mode: 0644]

index eec1f135cca59172300984e1870dc85e8318035f..4eb430fc6ad545add10516285701c5817ed97aac 100644 (file)
@@ -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 (file)
index 0000000..3f05e38
Binary files /dev/null and b/unified_inventory/sounds/trash.ogg differ
diff --git a/unified_inventory/sounds/trash_all.ogg b/unified_inventory/sounds/trash_all.ogg
new file mode 100644 (file)
index 0000000..0ba67bf
Binary files /dev/null and b/unified_inventory/sounds/trash_all.ogg differ