diff options
author | RealBadAngel <mk@realbadangel.pl> | 2013-03-02 04:42:45 +0100 |
---|---|---|
committer | RealBadAngel <mk@realbadangel.pl> | 2013-03-02 04:42:45 +0100 |
commit | d300a54c6551751531445bf41de582a7e1f77bcd (patch) | |
tree | 328e2255fe854fc35e2175604c92db380b89ce51 | |
parent | cc06004381d026e9fb72caafc5bea72dfe14ca9b (diff) |
ui update
-rw-r--r-- | unified_inventory/api.lua | 9 | ||||
-rw-r--r-- | unified_inventory/sounds/birds.ogg | bin | 0 -> 14797 bytes | |||
-rw-r--r-- | unified_inventory/sounds/click.ogg | bin | 0 -> 7723 bytes | |||
-rw-r--r-- | unified_inventory/sounds/owl.ogg | bin | 0 -> 50950 bytes |
4 files changed, 9 insertions, 0 deletions
diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua index 4eb430f..faa944f 100644 --- a/unified_inventory/api.lua +++ b/unified_inventory/api.lua @@ -327,6 +327,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end if fields.misc_set_day then if minetest.get_player_privs(player_name).settime==true then + minetest.sound_play("birds", {to_player=player_name, gain = 1.0}) minetest.env:set_timeofday((6000 % 24000) / 24000) minetest.chat_send_player(player_name, "Time of day set to 6am") else @@ -335,6 +336,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end if fields.misc_set_night then if minetest.get_player_privs(player_name).settime==true then + minetest.sound_play("owl", {to_player=player_name, gain = 1.0}) minetest.env:set_timeofday((21000 % 24000) / 24000) minetest.chat_send_player(player_name, "Time of day set to 9pm") else @@ -355,21 +357,27 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local pagemax = math.floor((unified_inventory.filtered_items_list_size[player_name]-1) / (80) + 1) if fields.start_list then + minetest.sound_play("click", {to_player=player_name, gain = 1.0}) start_i = 1 end if fields.rewind1 then + minetest.sound_play("click", {to_player=player_name, gain = 1.0}) start_i = start_i - 1 end if fields.forward1 then + minetest.sound_play("click", {to_player=player_name, gain = 1.0}) start_i = start_i + 1 end if fields.rewind3 then + minetest.sound_play("click", {to_player=player_name, gain = 1.0}) start_i = start_i - 3 end if fields.forward3 then + minetest.sound_play("click", {to_player=player_name, gain = 1.0}) start_i = start_i + 3 end if fields.end_list then + minetest.sound_play("click", {to_player=player_name, gain = 1.0}) start_i = pagemax end if start_i < 1 then @@ -389,6 +397,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) for i=0,80,1 do local button="item_button"..list_index if fields[button] then + minetest.sound_play("click", {to_player=player_name, gain = 1.0}) if minetest.setting_getbool("creative_mode")==false then unified_inventory.set_inventory_formspec(player, unified_inventory.get_formspec(player,"craftguide")) page="craftguide" diff --git a/unified_inventory/sounds/birds.ogg b/unified_inventory/sounds/birds.ogg Binary files differnew file mode 100644 index 0000000..4a93395 --- /dev/null +++ b/unified_inventory/sounds/birds.ogg diff --git a/unified_inventory/sounds/click.ogg b/unified_inventory/sounds/click.ogg Binary files differnew file mode 100644 index 0000000..061d837 --- /dev/null +++ b/unified_inventory/sounds/click.ogg diff --git a/unified_inventory/sounds/owl.ogg b/unified_inventory/sounds/owl.ogg Binary files differnew file mode 100644 index 0000000..f30d0b3 --- /dev/null +++ b/unified_inventory/sounds/owl.ogg |