mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 13:52:31 +01:00
ui update
This commit is contained in:
parent
cc06004381
commit
d300a54c65
@ -327,6 +327,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
end
|
end
|
||||||
if fields.misc_set_day then
|
if fields.misc_set_day then
|
||||||
if minetest.get_player_privs(player_name).settime==true 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.env:set_timeofday((6000 % 24000) / 24000)
|
||||||
minetest.chat_send_player(player_name, "Time of day set to 6am")
|
minetest.chat_send_player(player_name, "Time of day set to 6am")
|
||||||
else
|
else
|
||||||
@ -335,6 +336,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
end
|
end
|
||||||
if fields.misc_set_night then
|
if fields.misc_set_night then
|
||||||
if minetest.get_player_privs(player_name).settime==true 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.env:set_timeofday((21000 % 24000) / 24000)
|
||||||
minetest.chat_send_player(player_name, "Time of day set to 9pm")
|
minetest.chat_send_player(player_name, "Time of day set to 9pm")
|
||||||
else
|
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)
|
local pagemax = math.floor((unified_inventory.filtered_items_list_size[player_name]-1) / (80) + 1)
|
||||||
|
|
||||||
if fields.start_list then
|
if fields.start_list then
|
||||||
|
minetest.sound_play("click", {to_player=player_name, gain = 1.0})
|
||||||
start_i = 1
|
start_i = 1
|
||||||
end
|
end
|
||||||
if fields.rewind1 then
|
if fields.rewind1 then
|
||||||
|
minetest.sound_play("click", {to_player=player_name, gain = 1.0})
|
||||||
start_i = start_i - 1
|
start_i = start_i - 1
|
||||||
end
|
end
|
||||||
if fields.forward1 then
|
if fields.forward1 then
|
||||||
|
minetest.sound_play("click", {to_player=player_name, gain = 1.0})
|
||||||
start_i = start_i + 1
|
start_i = start_i + 1
|
||||||
end
|
end
|
||||||
if fields.rewind3 then
|
if fields.rewind3 then
|
||||||
|
minetest.sound_play("click", {to_player=player_name, gain = 1.0})
|
||||||
start_i = start_i - 3
|
start_i = start_i - 3
|
||||||
end
|
end
|
||||||
if fields.forward3 then
|
if fields.forward3 then
|
||||||
|
minetest.sound_play("click", {to_player=player_name, gain = 1.0})
|
||||||
start_i = start_i + 3
|
start_i = start_i + 3
|
||||||
end
|
end
|
||||||
if fields.end_list then
|
if fields.end_list then
|
||||||
|
minetest.sound_play("click", {to_player=player_name, gain = 1.0})
|
||||||
start_i = pagemax
|
start_i = pagemax
|
||||||
end
|
end
|
||||||
if start_i < 1 then
|
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
|
for i=0,80,1 do
|
||||||
local button="item_button"..list_index
|
local button="item_button"..list_index
|
||||||
if fields[button] then
|
if fields[button] then
|
||||||
|
minetest.sound_play("click", {to_player=player_name, gain = 1.0})
|
||||||
if minetest.setting_getbool("creative_mode")==false then
|
if minetest.setting_getbool("creative_mode")==false then
|
||||||
unified_inventory.set_inventory_formspec(player, unified_inventory.get_formspec(player,"craftguide"))
|
unified_inventory.set_inventory_formspec(player, unified_inventory.get_formspec(player,"craftguide"))
|
||||||
page="craftguide"
|
page="craftguide"
|
||||||
|
BIN
unified_inventory/sounds/birds.ogg
Normal file
BIN
unified_inventory/sounds/birds.ogg
Normal file
Binary file not shown.
BIN
unified_inventory/sounds/click.ogg
Normal file
BIN
unified_inventory/sounds/click.ogg
Normal file
Binary file not shown.
BIN
unified_inventory/sounds/owl.ogg
Normal file
BIN
unified_inventory/sounds/owl.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user