Browse Source

Add sound on player click

tags/1.14.2
Jean-Patrick Guerrero 1 week ago
parent
commit
2fd3604cac
2 changed files with 6 additions and 0 deletions
  1. +6
    -0
      init.lua
  2. BIN
      sounds/craftguide_click.ogg

+ 6
- 0
init.lua View File

@@ -23,6 +23,7 @@ local reg_aliases = core.registered_aliases
local log = core.log
local after = core.after
local clr = core.colorize
local sound_play = core.sound_play
local parse_json = core.parse_json
local write_json = core.write_json
local chat_send = core.chat_send_player
@@ -1641,9 +1642,14 @@ on_joinplayer(function(player)
end)

local function fields(player, _f)
if _f.quit then return end
local name = player:get_player_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
reset_data(data)



BIN
sounds/craftguide_click.ogg View File


Loading…
Cancel
Save