mirror of
https://github.com/minetest-mods/warps.git
synced 2025-01-09 09:30:19 +01:00
Add sounds.
- woosh sound at warp start. Gets cancelled if you move. - plop sound at warp success. freesounds.org sounds, license/attribution included.
This commit is contained in:
parent
65c800e641
commit
37dc9db8b8
9
init.lua
9
init.lua
@ -26,6 +26,9 @@ local warp = function(player, dest)
|
|||||||
player:set_look_pitch(warps[i].pitch)
|
player:set_look_pitch(warps[i].pitch)
|
||||||
minetest.chat_send_player(player:get_player_name(), "Warped to \"" .. dest .. "\"")
|
minetest.chat_send_player(player:get_player_name(), "Warped to \"" .. dest .. "\"")
|
||||||
minetest.log("action", player:get_player_name() .. " warped to \"" .. dest .. "\"")
|
minetest.log("action", player:get_player_name() .. " warped to \"" .. dest .. "\"")
|
||||||
|
minetest.sound_play("warps_plop", {
|
||||||
|
pos = {x = warps[i].x, y = warps[i].y, z = warps[i].z},
|
||||||
|
})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -46,6 +49,7 @@ do_warp_queue = function()
|
|||||||
table.remove(warps_queue, i)
|
table.remove(warps_queue, i)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
minetest.sound_stop(e.sh)
|
||||||
minetest.chat_send_player(e.p:get_player_name(), "You have to stand still for " .. warps_freeze .. " seconds!")
|
minetest.chat_send_player(e.p:get_player_name(), "You have to stand still for " .. warps_freeze .. " seconds!")
|
||||||
table.remove(warps_queue, i)
|
table.remove(warps_queue, i)
|
||||||
end
|
end
|
||||||
@ -62,7 +66,8 @@ local warp_queue_add = function(player, dest)
|
|||||||
t = minetest.get_us_time() + ( warps_freeze * 1000000 ),
|
t = minetest.get_us_time() + ( warps_freeze * 1000000 ),
|
||||||
pos = player:getpos(),
|
pos = player:getpos(),
|
||||||
p = player,
|
p = player,
|
||||||
w = dest
|
w = dest,
|
||||||
|
sh = minetest.sound_play("warps_woosh", { pos = player:getpos() })
|
||||||
})
|
})
|
||||||
minetest.chat_send_player(player:get_player_name(), "Don't move for " .. warps_freeze .. " seconds!")
|
minetest.chat_send_player(player:get_player_name(), "Don't move for " .. warps_freeze .. " seconds!")
|
||||||
if queue_state == 0 then
|
if queue_state == 0 then
|
||||||
@ -195,7 +200,7 @@ minetest.register_node("warps:warpstone", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = { choppy=3 },
|
groups = { choppy=3 },
|
||||||
light_source = 5,
|
light_source = 8,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.25, -0.5, -0.25, 0.25, 0.5, 0.25}
|
fixed = {-0.25, -0.5, -0.25, 0.25, 0.5, 0.25}
|
||||||
|
10
sounds/LICENSE
Normal file
10
sounds/LICENSE
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
File: warps_plop.ogg
|
||||||
|
Original: 19987__acclivity__fingerplop1.flac
|
||||||
|
Url: https://www.freesound.org/people/acclivity/sounds/19987/
|
||||||
|
License: CC-BY-NC-3.0
|
||||||
|
|
||||||
|
File: warps_woosh.ogg
|
||||||
|
Original: 112837__dymewiz__whoosh-21.wav
|
||||||
|
Url: https://www.freesound.org/people/Dymewiz/sounds/112837/
|
||||||
|
License: CC-BY-3.0
|
BIN
sounds/warps_plop.ogg
Normal file
BIN
sounds/warps_plop.ogg
Normal file
Binary file not shown.
BIN
sounds/warps_woosh.ogg
Normal file
BIN
sounds/warps_woosh.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user