audio_lib: use play_sound instead of deprecated play_sfx
This commit is contained in:
parent
0d5d05705d
commit
a8b24865c7
@ -15,7 +15,7 @@ local obstacle = {
|
||||
local p_name = killer:get_player_name()
|
||||
if not arena_lib.is_player_in_arena(p_name) then return end
|
||||
|
||||
audio_lib.play_sfx("bl_tutorial_sentry_death", {object = self.object, max_hear_distance = 20})
|
||||
audio_lib.play_sound("bl_tutorial_sentry_death", {object = self.object, max_hear_distance = 20})
|
||||
bl_tutorial.decrease_obstacles(p_name)
|
||||
end,
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ local sentry = {
|
||||
on_activate = function(self)
|
||||
local sentry = self.object
|
||||
sentry:set_animation({x=120, y=130}, 20, nil, false)
|
||||
audio_lib.play_sfx("bl_tutorial_sentry_spawn", {gain = 0.2, pitch = 1.15, object = sentry, max_hear_distance = SENTRY_RANGE + 5})
|
||||
audio_lib.play_sound("bl_tutorial_sentry_spawn", {gain = 0.2, pitch = 1.15, object = sentry, max_hear_distance = SENTRY_RANGE + 5})
|
||||
minetest.after(1.2, function()
|
||||
if not self.object then return end
|
||||
self.object:set_animation({x=1, y=100}, 20)
|
||||
@ -92,7 +92,7 @@ local sentry = {
|
||||
entity:set_animation({x=112, y=115}, 25, nil, false)
|
||||
self.dying = true
|
||||
|
||||
audio_lib.play_sfx("bl_tutorial_sentry_death", {object = entity, max_hear_distance = SENTRY_RANGE + 5})
|
||||
audio_lib.play_sound("bl_tutorial_sentry_death", {object = entity, max_hear_distance = SENTRY_RANGE + 5})
|
||||
minetest.add_particlespawner({
|
||||
attached = self.object,
|
||||
amount = 200,
|
||||
@ -148,7 +148,7 @@ function rotate_and_shoot(sentry, dir)
|
||||
local pointed_object = block_league.get_pointed_objects(sentry, 20, false, {height = sentry_centre, dir = dir})
|
||||
|
||||
draw_particles(dir, vector.add(sentry:get_pos(), vector.new(0, sentry_centre, 0)))
|
||||
audio_lib.play_sfx("bl_smg_shoot", {pitch = 2.3, object = sentry, max_hear_distance = SENTRY_RANGE + 5})
|
||||
audio_lib.play_sound("bl_smg_shoot", {pitch = 2.3, object = sentry, max_hear_distance = SENTRY_RANGE + 5})
|
||||
|
||||
if next(pointed_object) then
|
||||
local target = pointed_object[1].object
|
||||
|
@ -227,7 +227,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local skill = "block_league:" .. player:get_meta():get_string("bl_profile_elem_active")
|
||||
|
||||
block_league.set_player_skill(p_name, skill)
|
||||
audio_lib.play_sfx("bl_gui_equip_confirm", {to_player = p_name})
|
||||
audio_lib.play_sound("bl_gui_equip_confirm", {to_player = p_name})
|
||||
end
|
||||
|
||||
minetest.show_formspec(p_name, "block_league:profile", get_formspec(p_name))
|
||||
|
Loading…
x
Reference in New Issue
Block a user