forked from VoxeLibre/VoxeLibre
Add more fishing sounds! (#3800)
Go fishing with the fishing rod, and enjoy the sounds Co-authored-by: Niterux <parkerdec@gmail.com> Reviewed-on: MineClone2/MineClone2#3800 Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me> Co-authored-by: Niterux <parkerp1ggypc@gmail.com> Co-committed-by: Niterux <parkerp1ggypc@gmail.com>
This commit is contained in:
parent
52fba55910
commit
766c9efe33
|
@ -0,0 +1,15 @@
|
||||||
|
License of media (sounds)
|
||||||
|
--------------------------------------
|
||||||
|
CC0 1.0 Universal (CC0 1.0)
|
||||||
|
https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
|
||||||
|
Authors of media files
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
You're Perfect Studio (CC0)
|
||||||
|
https://opengameart.org/content/fisheefects
|
||||||
|
reel.wav, bloop.wav
|
||||||
|
|
||||||
|
tran5ient (CC0)
|
||||||
|
https://freesound.org/people/tran5ient/sounds/190080/
|
||||||
|
splash7.wav
|
|
@ -134,7 +134,7 @@ local fish = function(itemstack, player, pointed_thing)
|
||||||
minetest.add_item(pos, item)
|
minetest.add_item(pos, item)
|
||||||
end
|
end
|
||||||
if mcl_experience.throw_xp then
|
if mcl_experience.throw_xp then
|
||||||
mcl_experience.throw_xp(pos, math.random(1,6))
|
minetest.after(0.7, mcl_experience.throw_xp, pos, math.random(1,6))
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.is_creative_enabled(player:get_player_name()) then
|
if not minetest.is_creative_enabled(player:get_player_name()) then
|
||||||
|
@ -161,6 +161,7 @@ local fish = function(itemstack, player, pointed_thing)
|
||||||
end
|
end
|
||||||
--Destroy bobber.
|
--Destroy bobber.
|
||||||
ent.object:remove()
|
ent.object:remove()
|
||||||
|
minetest.sound_play("reel", {object=player, gain=0.1, max_hear_distance=16}, true)
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -242,6 +243,7 @@ local bobber_on_step = function(self, dtime)
|
||||||
if self._oldy == nil then
|
if self._oldy == nil then
|
||||||
self.object:set_pos({x=self.object:get_pos().x,y=math.floor(self.object:get_pos().y)+.5,z=self.object:get_pos().z})
|
self.object:set_pos({x=self.object:get_pos().x,y=math.floor(self.object:get_pos().y)+.5,z=self.object:get_pos().z})
|
||||||
self._oldy = self.object:get_pos().y
|
self._oldy = self.object:get_pos().y
|
||||||
|
minetest.sound_play("watersplash", {pos=epos, gain=0.25}, true)
|
||||||
end
|
end
|
||||||
-- reset to original position after dive.
|
-- reset to original position after dive.
|
||||||
if self.object:get_pos().y > self._oldy then
|
if self.object:get_pos().y > self._oldy then
|
||||||
|
@ -280,6 +282,7 @@ local bobber_on_step = function(self, dtime)
|
||||||
self._time = self._time + dtime
|
self._time = self._time + dtime
|
||||||
else
|
else
|
||||||
-- wait time is over time to dive.
|
-- wait time is over time to dive.
|
||||||
|
minetest.sound_play("bloop", {pos=epos, gain=0.4}, true)
|
||||||
self._dive = true
|
self._dive = true
|
||||||
self.object:set_velocity({x=0,y=-2,z=0})
|
self.object:set_velocity({x=0,y=-2,z=0})
|
||||||
self.object:set_acceleration({x=0,y=5,z=0})
|
self.object:set_acceleration({x=0,y=5,z=0})
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue