Merge pull request 'Add missing sounds for placing and digging villager profession blocks' (#3482) from fix_profession_node_sounds into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3482
Reviewed-by: Nicu <kneekoo@noreply.git.minetest.land>
This commit is contained in:
FossFanatic 2023-02-26 17:48:00 +00:00
commit 64d6fdaec5
7 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,7 @@ minetest.register_node("mcl_cartography_table:cartography_table", {
},
paramtype2 = "facedir",
groups = { axey = 2, handy = 1, deco_block = 1, material_wood = 1, flammable = 1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5
})

View File

@ -1,3 +1,4 @@
name = mcl_cartography_table
author = PrairieWind
depends = mcl_core, mcl_sounds, mcl_tools
description = Adds the cartography table villager workstation to MineClone 2/5. Used to copy and create maps.

View File

@ -11,6 +11,7 @@ minetest.register_node("mcl_fletching_table:fletching_table", {
},
paramtype2 = "facedir",
groups = { axey = 2, handy = 1, deco_block = 1, material_wood = 1, flammable = 1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5
})

View File

@ -1,3 +1,4 @@
name = mcl_fletching_table
author = PrairieWind
depends = mcl_core, mcl_sounds, mcl_tools
description = Adds the fletching table villager workstation to MineClone 2/5.

View File

@ -96,6 +96,15 @@ local lectern_def = {
local lectern_node = ItemStack(itemstack)
-- Place the node!
local _, success = minetest.item_place_node(lectern_node, placer, pointed_thing, fdir)
-- Add placement sound.
local idef = lectern_node:get_definition()
if success then
if idef.sounds and idef.sounds.place then
minetest.sound_play(idef.sounds.place, {pos=above, gain=1}, true)
end
end
if not success then
return itemstack
end

View File

@ -12,6 +12,7 @@ minetest.register_node("mcl_loom:loom", {
},
paramtype2 = "facedir",
groups = { axey = 2, handy = 1, deco_block = 1, material_wood = 1, flammable = 1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5
})

View File

@ -1,3 +1,4 @@
name = mcl_loom
author = PrairieWind
depends = mcl_core, mcl_sounds, mcl_tools
description = Adds the loom villager workstation to MineClone 2/5. Used to add patterns to banners.