forked from MineClone5/MineClone5
Update sounds of snowed dirtlike blocks
This commit is contained in:
parent
93fdf83c07
commit
5c906f4af6
|
@ -1115,10 +1115,11 @@ minetest.register_abm({
|
||||||
-- * itemstring_snowed: Itemstring of the snowed node to add
|
-- * itemstring_snowed: Itemstring of the snowed node to add
|
||||||
-- * itemstring_clear: Itemstring of the original “clear” node without snow
|
-- * itemstring_clear: Itemstring of the original “clear” node without snow
|
||||||
-- * tiles: Optional custom tiles
|
-- * tiles: Optional custom tiles
|
||||||
|
-- * sounds: Optional custom sounds
|
||||||
--
|
--
|
||||||
-- The snowable nodes also MUST have _mcl_snowed defined to contain the name
|
-- The snowable nodes also MUST have _mcl_snowed defined to contain the name
|
||||||
-- of the snowed node.
|
-- of the snowed node.
|
||||||
mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles)
|
mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds)
|
||||||
local def = table.copy(minetest.registered_nodes[itemstring_clear])
|
local def = table.copy(minetest.registered_nodes[itemstring_clear])
|
||||||
-- Just some group clearing
|
-- Just some group clearing
|
||||||
def.description = nil
|
def.description = nil
|
||||||
|
@ -1137,6 +1138,15 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti
|
||||||
|
|
||||||
if not tiles then
|
if not tiles then
|
||||||
def.tiles = {"default_snow.png", "default_dirt.png", "mcl_core_grass_side_snowed.png"}
|
def.tiles = {"default_snow.png", "default_dirt.png", "mcl_core_grass_side_snowed.png"}
|
||||||
|
else
|
||||||
|
def.tiles = tiles
|
||||||
|
end
|
||||||
|
if not sounds then
|
||||||
|
def.sounds = mcl_sounds.node_sound_dirt_defaults({
|
||||||
|
footstep = { name = "pedology_snow_soft_footstep", gain = 0.5 }
|
||||||
|
})
|
||||||
|
else
|
||||||
|
def.sounds = sounds
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Register stuff
|
-- Register stuff
|
||||||
|
|
Loading…
Reference in New Issue