0
0
Fork 0

Change fallback armor (un)equip sounds

This commit is contained in:
Wuzzy 2020-02-18 16:36:22 +01:00
parent 89afec17b1
commit 364a4152ac
5 changed files with 21 additions and 1 deletions

View File

@ -20,6 +20,10 @@ Source: <https://freesound.org/people/juryduty/sounds/180231/>
Licensed CC0, by Freesound.org user mtchanary. Licensed CC0, by Freesound.org user mtchanary.
Source: <https://freesound.org/people/mitchanary/sounds/506148/> Source: <https://freesound.org/people/mitchanary/sounds/506148/>
* mcl_armor_equip_generic.ogg
* mcl_armor_unequip_generic.ogg
Licensed (CC BY-SA 3.0) by Mito551
All other sounds licensed CC0 by OpenGameArt.org user artisticdude. All other sounds licensed CC0 by OpenGameArt.org user artisticdude.
Source: <https://opengameart.org/content/rpg-sound-pack> Source: <https://opengameart.org/content/rpg-sound-pack>

View File

@ -232,7 +232,7 @@ armor.play_equip_sound = function(self, player, stack, unequip)
local snd = def.sounds and def.sounds["_mcl_armor_"..estr] local snd = def.sounds and def.sounds["_mcl_armor_"..estr]
if not snd then if not snd then
-- Fallback sound -- Fallback sound
snd = { name = "mcl_armor_"..estr.."_iron" } snd = { name = "mcl_armor_"..estr.."_generic" }
end end
if snd then if snd then
minetest.sound_play(snd, {object=player, gain=0.5, max_hear_distance=8}) minetest.sound_play(snd, {object=player, gain=0.5, max_hear_distance=8})

View File

@ -41,6 +41,10 @@ minetest.register_tool("mcl_armor:helmet_gold", {
inventory_image = "mcl_armor_inv_helmet_gold.png", inventory_image = "mcl_armor_inv_helmet_gold.png",
groups = {armor_head=1, mcl_armor_points=2, mcl_armor_uses=78}, groups = {armor_head=1, mcl_armor_points=2, mcl_armor_uses=78},
_repair_material = "mcl_core:gold_ingot", _repair_material = "mcl_core:gold_ingot",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_iron",
_mcl_armor_unequip = "mcl_armor_unequip_iron",
},
}) })
minetest.register_tool("mcl_armor:helmet_diamond",{ minetest.register_tool("mcl_armor:helmet_diamond",{
@ -104,6 +108,10 @@ minetest.register_tool("mcl_armor:chestplate_gold", {
inventory_image = "mcl_armor_inv_chestplate_gold.png", inventory_image = "mcl_armor_inv_chestplate_gold.png",
groups = {armor_torso=1, mcl_armor_points=5, mcl_armor_uses=113}, groups = {armor_torso=1, mcl_armor_points=5, mcl_armor_uses=113},
_repair_material = "mcl_core:gold_ingot", _repair_material = "mcl_core:gold_ingot",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_iron",
_mcl_armor_unequip = "mcl_armor_unequip_iron",
},
}) })
minetest.register_tool("mcl_armor:chestplate_diamond",{ minetest.register_tool("mcl_armor:chestplate_diamond",{
@ -167,6 +175,10 @@ minetest.register_tool("mcl_armor:leggings_gold", {
inventory_image = "mcl_armor_inv_leggings_gold.png", inventory_image = "mcl_armor_inv_leggings_gold.png",
groups = {armor_legs=1, mcl_armor_points=3, mcl_armor_uses=106}, groups = {armor_legs=1, mcl_armor_points=3, mcl_armor_uses=106},
_repair_material = "mcl_core:gold_ingot", _repair_material = "mcl_core:gold_ingot",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_iron",
_mcl_armor_unequip = "mcl_armor_unequip_iron",
},
}) })
minetest.register_tool("mcl_armor:leggings_diamond",{ minetest.register_tool("mcl_armor:leggings_diamond",{
@ -229,6 +241,10 @@ minetest.register_tool("mcl_armor:boots_gold", {
inventory_image = "mcl_armor_inv_boots_gold.png", inventory_image = "mcl_armor_inv_boots_gold.png",
groups = {armor_feet=1, mcl_armor_points=1, mcl_armor_uses=92}, groups = {armor_feet=1, mcl_armor_points=1, mcl_armor_uses=92},
_repair_material = "mcl_core:gold_ingot", _repair_material = "mcl_core:gold_ingot",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_iron",
_mcl_armor_unequip = "mcl_armor_unequip_iron",
},
}) })
minetest.register_tool("mcl_armor:boots_diamond",{ minetest.register_tool("mcl_armor:boots_diamond",{