7 function mcl_sounds
.node_sound_defaults(table)
9 table.footstep
= table.footstep
or
11 table.dug
= table.dug
or
12 {name
="default_dug_node", gain
=0.25}
13 table.dig
= table.dig
or
14 {name
="default_dig_oddly_breakable_by_hand", gain
=1.0}
15 table.place
= table.place
or
16 {name
="default_place_node_hard", gain
=1.0}
20 function mcl_sounds
.node_sound_stone_defaults(table)
22 table.footstep
= table.footstep
or
23 {name
="default_hard_footstep", gain
=0.5}
24 table.dug
= table.dug
or
25 {name
="default_hard_footstep", gain
=1.0}
26 table.dig
= table.dig
or
27 {name
="default_dig_cracky", gain
=1.0}
28 mcl_sounds
.node_sound_defaults(table)
32 function mcl_sounds
.node_sound_metal_defaults(table)
34 table.footstep
= table.footstep
or
35 {name
="default_metal_footstep", gain
=0.5}
36 table.dug
= table.dug
or
37 {name
="default_dug_metal", gain
=1.0}
38 table.dig
= table.dig
or
39 {name
="default_dig_metal", gain
=1.0}
40 table.place
= table.place
or
41 {name
="default_place_node_metal", gain
=1.0}
42 mcl_sounds
.node_sound_defaults(table)
46 function mcl_sounds
.node_sound_dirt_defaults(table)
48 table.footstep
= table.footstep
or
49 {name
="default_dirt_footstep", gain
=1.0}
50 table.dug
= table.dug
or
51 {name
="default_dirt_footstep", gain
=1.5}
52 table.dig
= table.dig
or
53 {name
="default_dig_crumbly", gain
=1.0}
54 table.place
= table.place
or
55 {name
="default_place_node", gain
=1.0}
56 mcl_sounds
.node_sound_defaults(table)
60 function mcl_sounds
.node_sound_sand_defaults(table)
62 table.footstep
= table.footstep
or
63 {name
="default_sand_footstep", gain
=0.5}
64 table.dug
= table.dug
or
65 {name
="default_sand_footstep", gain
=1.0}
66 table.dig
= table.dig
or
67 {name
="default_dig_crumbly", gain
=1.0}
68 table.place
= table.place
or
69 {name
="default_place_node", gain
=1.0}
70 mcl_sounds
.node_sound_defaults(table)
74 function mcl_sounds
.node_sound_snow_defaults(table)
76 table.footstep
= table.footstep
or
77 {name
="pedology_snow_soft_footstep", gain
=0.5}
78 table.dug
= table.dug
or
79 {name
="pedology_snow_soft_footstep", gain
=1.0}
80 table.dig
= table.dig
or
81 {name
="default_dig_crumbly", gain
=1.0}
82 table.place
= table.place
or
83 {name
="default_place_node", gain
=1.0}
84 mcl_sounds
.node_sound_defaults(table)
88 function mcl_sounds
.node_sound_wood_defaults(table)
90 table.footstep
= table.footstep
or
91 {name
="default_wood_footstep", gain
=0.5}
92 table.dug
= table.dug
or
93 {name
="default_wood_footstep", gain
=1.0}
94 table.dig
= table.dig
or
95 {name
="default_dig_choppy", gain
=1.0}
96 mcl_sounds
.node_sound_defaults(table)
100 function mcl_sounds
.node_sound_wool_defaults(table)
102 table.footstep
= table.footstep
or
103 {name
="mcl_sounds_cloth", gain
=0.5}
104 table.dug
= table.dug
or
105 {name
="mcl_sounds_cloth", gain
=1.0}
106 table.dig
= table.dig
or
107 {name
="mcl_sounds_cloth", gain
=0.9}
108 table.place
= table.dig
or
109 {name
="mcl_sounds_cloth", gain
=1.0}
110 mcl_sounds
.node_sound_defaults(table)
114 function mcl_sounds
.node_sound_leaves_defaults(table)
116 table.footstep
= table.footstep
or
117 {name
="default_grass_footstep", gain
=0.35}
118 table.dug
= table.dug
or
119 {name
="default_grass_footstep", gain
=0.85}
120 table.dig
= table.dig
or
121 {name
="default_dig_snappy", gain
=0.4}
122 table.place
= table.place
or
123 {name
="default_place_node", gain
=1.0}
124 mcl_sounds
.node_sound_defaults(table)
128 function mcl_sounds
.node_sound_glass_defaults(table)
130 table.footstep
= table.footstep
or
131 {name
="default_glass_footstep", gain
=0.5}
132 table.dug
= table.dug
or
133 {name
="default_break_glass", gain
=1.0}
134 table.dig
= table.dig
or
135 {name
="default_dig_cracky", gain
=1.0}
136 mcl_sounds
.node_sound_defaults(table)
140 function mcl_sounds
.node_sound_water_defaults(table)
142 table.footstep
= table.footstep
or
143 {name
= "default_water_footstep", gain
= 0.2}
144 table.place
= table.place
or
145 {name
= "mcl_sounds_place_node_water", gain
= 1.0}
146 table.dug
= table.dug
or
147 {name
= "mcl_sounds_dug_water", gain
= 1.0}
148 mcl_sounds
.node_sound_defaults(table)
152 function mcl_sounds
.node_sound_lava_defaults(table)
155 table.place
= table.place
or
156 {name
= "default_place_node_lava", gain
= 1.0}
157 table.dug
= table.dug
or
158 {name
= "default_place_node_lava", gain
= 1.0}
159 -- TODO: Different dug sound
160 mcl_sounds
.node_sound_defaults(table)
164 -- Player death sound
165 minetest
.register_on_dieplayer(function(player
)
166 -- TODO: Add separate death sound
167 minetest
.sound_play({name
="player_damage", gain
= 1.0}, {pos
=player
:get_pos(), max_hear_distance
=16}, true)