New sounds for teleport/trash

This commit is contained in:
Jean-Patrick Guerrero 2021-11-08 18:46:45 +01:00
parent af2c1304ac
commit c51da4a20b
6 changed files with 6 additions and 1 deletions

BIN
sounds/i3_teleport.ogg Normal file

Binary file not shown.

BIN
sounds/i3_trash.ogg Normal file

Binary file not shown.

View File

@ -350,6 +350,9 @@ local function get_stack(player, stack)
end
local function safe_teleport(player, pos)
local name = player:get_player_name()
core.sound_play("i3_teleport", {to_player = name, gain = 1.0}, true)
pos.y = pos.y + 0.5
local vel = player:get_velocity()
player:add_velocity(vector.multiply(vel, -1))

View File

@ -557,7 +557,7 @@ local function get_inventory_fs(player, data, fs)
local btn = {
{"trash", ES"Clear inventory"},
{"sort", ES"Sort items"},
{"sort", ES"Sort inventory"},
{"settings", ES"Settings"},
{"home", ES"Go home"},
}

View File

@ -535,6 +535,7 @@ local trash = core.create_detached_inventory("i3_trash", {
inv:set_list(listname, {})
local name = player:get_player_name()
core.sound_play("i3_trash", {to_player = name, gain = 1.0}, true)
if not core.is_creative_enabled(name) then
i3.set_fs(player)

View File

@ -87,6 +87,7 @@ local styles = string.format([[
style[confirm_trash_yes,confirm_trash_no,set_home;noclip=true;font_size=16;
bgimg=i3_btn9.png;bgimg_hovered=i3_btn9_hovered.png;
bgimg_pressed=i3_btn9_pressed.png;bgimg_middle=4,6]
style[confirm_trash_yes;sound=i3_trash]
]],
PNG.slot,
PNG.exit, PNG.exit_hover,