Add new rotation sound
parent
61a282a74c
commit
022575e585
|
@ -24,8 +24,10 @@ Models:
|
|||
|
||||
Sounds:
|
||||
- All sounds come from Minetest Game (see license of Minetest Game 5.4.1 for details)
|
||||
- Exception 1: Ocean waves come from https://freesound.org/people/inchadney/sounds/135805/
|
||||
- Exception 1: Ocean waves come from <https://freesound.org/people/inchadney/sounds/135805/>
|
||||
- by inchadney (CC BY 3.0)
|
||||
- Exception 2: Mirror rotation sound comes from <https://freesound.org/people/killianm97/sounds/554236/>
|
||||
- by killanm97 (CC0)
|
||||
|
||||
Code:
|
||||
- `player_api`, `stairs`, `xpanes` come from Minetest Game 5.4.1 (mods modified for Lazarr!), by Minetest Game developers (see README.txt in those folders)
|
||||
|
|
|
@ -106,7 +106,6 @@ local register_element = function(subname, def)
|
|||
def_core.after_place_node = full_update
|
||||
def_core.after_dig_node = full_update
|
||||
def_core._after_rotate = after_rotate
|
||||
def_core.sounds = lzr_sounds.node_sound_wood_defaults()
|
||||
def_core._lzr_active = "lzr_laser:"..subname.."_on"
|
||||
def_core.tiles = def.tiles_off
|
||||
def_core.groups[subname] = 1
|
||||
|
@ -142,6 +141,9 @@ register_element("mirror", {
|
|||
"lzr_laser_mirror_on_hole.png",
|
||||
},
|
||||
groups = { rotatable = 1, laser_block = 1, dig_immediate = 3 },
|
||||
sounds = lzr_sounds.node_sound_glass_defaults({
|
||||
_rotate = {name = "lzr_laser_mirror_rotate", gain = 1.0},
|
||||
})
|
||||
})
|
||||
|
||||
register_element("transmissive_mirror", {
|
||||
|
@ -164,6 +166,9 @@ register_element("transmissive_mirror", {
|
|||
"lzr_laser_transmissive_mirror_on_hole.png",
|
||||
},
|
||||
groups = { rotatable = 1, laser_block = 1, dig_immediate = 3 },
|
||||
sounds = lzr_sounds.node_sound_glass_defaults({
|
||||
_rotate = {name = "lzr_laser_mirror_rotate", gain = 1.0},
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
@ -209,6 +214,7 @@ register_element("emitter", {
|
|||
lzr_laser.full_laser_update(lzr_globals.PLAYFIELD_START, lzr_globals.PLAYFIELD_END)
|
||||
end,
|
||||
groups = { laser_block = 1 },
|
||||
sounds = lzr_sounds.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
register_element("detector", {
|
||||
|
@ -231,5 +237,6 @@ register_element("detector", {
|
|||
"lzr_laser_detector_on_front.png",
|
||||
},
|
||||
groups = { laser_block = 1 },
|
||||
sounds = lzr_sounds.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
|
|
Binary file not shown.
|
@ -212,7 +212,11 @@ function screwdriver.use(itemstack, player, pointed_thing, is_right_click)
|
|||
|
||||
-- Draw particles (TODO: check if rotation was actually done)
|
||||
particle_ring(vector.add(pos, particle_offset), axis, amount)
|
||||
-- TODO: Play sound
|
||||
-- Play sound
|
||||
if def.sounds and def.sounds._rotate then
|
||||
minetest.sound_play(def.sounds._rotate, {pos=pos}, true)
|
||||
end
|
||||
-- TODO: Play default fallback sound
|
||||
|
||||
-- Replace node
|
||||
if not handled then
|
||||
|
|
Loading…
Reference in New Issue