From: RealBadAngel Date: Sat, 2 Mar 2013 03:08:42 +0000 (+0100) Subject: UI update X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=cc06004381d026e9fb72caafc5bea72dfe14ca9b;p=zefram%2Fminetest%2Ftechnic.git UI update --- 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 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 index 0000000..0ba67bf Binary files /dev/null and b/unified_inventory/sounds/trash_all.ogg differ