Add another rotation sound

master
Wuzzy 2021-12-27 17:58:59 +01:00
parent 022575e585
commit 3bd63c16f3
3 changed files with 9 additions and 4 deletions

View File

@ -23,11 +23,13 @@ Models:
- Player models comes from Minetest Game (see license of Minetest Game 5.4.1 for details)
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/>
- 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/>
- Mirror rotation sound comes from <https://freesound.org/people/killianm97/sounds/554236/>
- by killanm97 (CC0)
- `screwdriver2_rotate.ogg` comes from <https://freesound.org/people/el_boss/sounds/560700/>
- by el\_boss (CC0)
- All other sounds come from Minetest Game (see license of Minetest Game 5.4.1 for details)
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)

View File

@ -155,6 +155,7 @@ function screwdriver.use(itemstack, player, pointed_thing, is_right_click)
if not def then return end -- probably unnessesary
-- Node MUST have 'rotatable' group
-- TODO: Allow rotation in level editing/admin mode
if not def.groups.rotatable then
return itemstack
end
@ -212,11 +213,13 @@ 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)
-- Play sound
if def.sounds and def.sounds._rotate then
minetest.sound_play(def.sounds._rotate, {pos=pos}, true)
else
minetest.sound_play({name="screwdriver2_rotate", gain=1}, {pos=pos}, true)
end
-- TODO: Play default fallback sound
-- Replace node
if not handled then

Binary file not shown.