diff --git a/mods/ITEMS/mcl_fishing/README.txt b/mods/ITEMS/mcl_fishing/README.txt new file mode 100644 index 000000000..b80d77936 --- /dev/null +++ b/mods/ITEMS/mcl_fishing/README.txt @@ -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 \ No newline at end of file diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index 4e70abce4..893a376f5 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -134,7 +134,7 @@ local fish = function(itemstack, player, pointed_thing) minetest.add_item(pos, item) end 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 if not minetest.is_creative_enabled(player:get_player_name()) then @@ -161,6 +161,7 @@ local fish = function(itemstack, player, pointed_thing) end --Destroy bobber. ent.object:remove() + minetest.sound_play("reel", {object=player, gain=0.1, max_hear_distance=16}, true) return itemstack end end @@ -242,6 +243,7 @@ local bobber_on_step = function(self, dtime) 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._oldy = self.object:get_pos().y + minetest.sound_play("watersplash", {pos=epos, gain=0.25}, true) end -- reset to original position after dive. 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 else -- wait time is over time to dive. + minetest.sound_play("bloop", {pos=epos, gain=0.4}, true) self._dive = true self.object:set_velocity({x=0,y=-2,z=0}) self.object:set_acceleration({x=0,y=5,z=0}) diff --git a/mods/ITEMS/mcl_fishing/sounds/bloop.ogg b/mods/ITEMS/mcl_fishing/sounds/bloop.ogg new file mode 100644 index 000000000..c724f5693 Binary files /dev/null and b/mods/ITEMS/mcl_fishing/sounds/bloop.ogg differ diff --git a/mods/ITEMS/mcl_fishing/sounds/reel.ogg b/mods/ITEMS/mcl_fishing/sounds/reel.ogg new file mode 100644 index 000000000..2d4d0d350 Binary files /dev/null and b/mods/ITEMS/mcl_fishing/sounds/reel.ogg differ diff --git a/mods/ITEMS/mcl_fishing/sounds/watersplash.ogg b/mods/ITEMS/mcl_fishing/sounds/watersplash.ogg new file mode 100644 index 000000000..4cb6cb46b Binary files /dev/null and b/mods/ITEMS/mcl_fishing/sounds/watersplash.ogg differ