Add grass dug and leaf footstep sounds

master
Wuzzy 2022-02-15 02:08:52 +01:00
parent a6862a2280
commit ef094929a8
13 changed files with 28 additions and 7 deletions

View File

@ -84,7 +84,7 @@ Sounds:
- by Fourier <https://opengameart.org/content/forward-button-press-ui-sound>
- Edit by Wuzzy (shortened)
- License: CC BY 3.0
- `lzr_sounds_footstep_stone.*.ogg`, `lzr_sounds_footstep_dirt.*.png`
- `lzr_sounds_footstep_stone.*.ogg`, `lzr_sounds_footstep_dirt.*.ogg`, `lzr_sounds_footstep_leaves.*.ogg`, `lzr_sounds_dug_grass.*.ogg`:
- by Wuzzy
- License: MIT License
- All other sounds come from Minetest Game (see license of Minetest Game 5.4.1 for details)

View File

@ -22,7 +22,7 @@ minetest.register_node("lzr_plants:island_grass", {
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
sounds = lzr_sounds.node_sound_leaves_defaults(),
sounds = lzr_sounds.node_sound_grass_defaults(),
groups = { punchdig = 1, laser_destroys = 1, attached_node = 1 },
drop = "",
buildable_to = true,
@ -43,7 +43,7 @@ minetest.register_node("lzr_plants:crab_grass", {
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
sounds = lzr_sounds.node_sound_leaves_defaults(),
sounds = lzr_sounds.node_sound_grass_defaults(),
groups = { punchdig = 1, laser_destroys = 1, attached_node = 1 },
drop = "",
buildable_to = true,
@ -65,7 +65,7 @@ minetest.register_node("lzr_plants:seaweed", {
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
sounds = lzr_sounds.node_sound_leaves_defaults(),
sounds = lzr_sounds.node_sound_grass_defaults(),
groups = { punchdig = 1, laser_destroys = 1, attached_node = 1 },
drop = "",
buildable_to = true,
@ -86,7 +86,7 @@ minetest.register_node("lzr_plants:coral_purple", {
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
sounds = lzr_sounds.node_sound_leaves_defaults(),
sounds = lzr_sounds.node_sound_grass_defaults(),
groups = { punchdig = 1, laser_destroys = 1, attached_node = 1 },
drop = "",
buildable_to = true,

View File

@ -21,8 +21,29 @@ function lzr_sounds.node_sound_stone_defaults(table)
return table
end
-- TODO: leaves
lzr_sounds.node_sound_leaves_defaults = lzr_sounds.node_sound_defaults
function lzr_sounds.node_sound_leaves_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "lzr_sounds_footstep_leaves", gain = 1.0}
table.dug = table.dug or
{name = "lzr_sounds_footstep_leaves", gain = 1.0}
table.place = table.place or
{name = "default_place_node", gain = 1.0}
lzr_sounds.node_sound_defaults(table)
return table
end
function lzr_sounds.node_sound_grass_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "lzr_sounds_footstep_leaves", gain = 1.0}
table.dug = table.dug or
{name = "lzr_sounds_dug_grass", gain = 1.0}
table.place = table.place or
{name = "default_place_node", gain = 1.0}
lzr_sounds.node_sound_defaults(table)
return table
end
function lzr_sounds.node_sound_dirt_defaults(table)
table = table or {}

Binary file not shown.

Binary file not shown.

Binary file not shown.