diff --git a/mods/ITEMS/mcl_throwing/README.md b/mods/ITEMS/mcl_throwing/README.md new file mode 100644 index 0000000000..c91a537e88 --- /dev/null +++ b/mods/ITEMS/mcl_throwing/README.md @@ -0,0 +1,26 @@ +# `mcl_throwing` + +It's a MineClone 2 mod containing throwable items like snowballs. + +## License of code + +- MIT License + +## License of media + +- `mcl_throwing_snowball_impact_soft.ogg`: + - License: CC BY 3.0 + - Author: YleArkisto (freesound.org) + - Source: + - Original title: `sfx_snowball_hit-03.wav` (file was edited) +- `mcl_throwing_snowball_impact_hard.ogg`: + - License: CC0 + - Author: Julien Matthey (freesound.org) + - Source: + - Original title: `JM_IMPACT_01c - Snow on cement.wav` (file was edited) +- `mcl_throwing_egg_impact.ogg`: + - License: CC0 + - Author: dav0r (freesound.org) + - Source: + - Original title: `d0_step_on_egg_04` (file was edited) +- Everything else: See MineClone 2 license infos diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index e3dbd5ca69..5897a6922a 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -187,6 +187,7 @@ local snowball_on_step = function(self, dtime) -- Destroy when hitting a solid node if self._lastpos.x~=nil then if (def and def.walkable) or not def then + minetest.sound_play("mcl_throwing_snowball_impact_hard", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 }) self.object:remove() return end @@ -201,6 +202,7 @@ local snowball_on_step = function(self, dtime) end if check_object_hit(self, pos, mob_damage) then + minetest.sound_play("mcl_throwing_snowball_impact_soft", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 }) return end @@ -254,6 +256,7 @@ local egg_on_step = function(self, dtime) end end end + minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }) self.object:remove() return end @@ -261,6 +264,7 @@ local egg_on_step = function(self, dtime) -- Destroy when hitting a mob or player (no chick spawning) if check_object_hit(self, pos) then + minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }) return end diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg new file mode 100644 index 0000000000..c4adf57a49 Binary files /dev/null and b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg differ diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg new file mode 100644 index 0000000000..a3e0a00ab3 Binary files /dev/null and b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_hard.ogg differ diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg new file mode 100644 index 0000000000..260cdb91a1 Binary files /dev/null and b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_snowball_impact_soft.ogg differ