mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-29 13:53:43 +01:00
Add sound on player click
This commit is contained in:
parent
96f9c85c77
commit
2fd3604cac
6
init.lua
6
init.lua
@ -23,6 +23,7 @@ local reg_aliases = core.registered_aliases
|
|||||||
local log = core.log
|
local log = core.log
|
||||||
local after = core.after
|
local after = core.after
|
||||||
local clr = core.colorize
|
local clr = core.colorize
|
||||||
|
local sound_play = core.sound_play
|
||||||
local parse_json = core.parse_json
|
local parse_json = core.parse_json
|
||||||
local write_json = core.write_json
|
local write_json = core.write_json
|
||||||
local chat_send = core.chat_send_player
|
local chat_send = core.chat_send_player
|
||||||
@ -1641,9 +1642,14 @@ on_joinplayer(function(player)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
local function fields(player, _f)
|
local function fields(player, _f)
|
||||||
|
if _f.quit then return end
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local data = pdata[name]
|
local data = pdata[name]
|
||||||
|
|
||||||
|
if not _f.key_enter_field then
|
||||||
|
sound_play("craftguide_click", {to_player = name, gain = 0.2})
|
||||||
|
end
|
||||||
|
|
||||||
if _f.clear then
|
if _f.clear then
|
||||||
reset_data(data)
|
reset_data(data)
|
||||||
|
|
||||||
|
BIN
sounds/craftguide_click.ogg
Normal file
BIN
sounds/craftguide_click.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user