0
0
Fork 0

add barrel sounds (#3670)

This PR Adds sounds to opening and closing barrels. The sounds are properly attributed in the 'attribution.txt' file. They are published under Creative Commons 0 (CC0) and the source for them is [here](https://freesound.org/people/quantumriver/sounds/552153/)

Reviewed-on: MineClone2/MineClone2#3670
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
Co-authored-by: SmokeyDope <smokey@tilde.team>
Co-committed-by: SmokeyDope <smokey@tilde.team>
This commit is contained in:
SmokeyDope 2023-05-04 21:48:07 +00:00 committed by ancientmarinerdev
parent 3e768c6a6f
commit 3b64ceb5b2
4 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,7 @@ local function barrel_open(pos, node, clicker)
minetest.swap_node(pos, { name = "mcl_barrels:barrel_open", param2 = node.param2 }) minetest.swap_node(pos, { name = "mcl_barrels:barrel_open", param2 = node.param2 })
open_barrels[playername] = pos open_barrels[playername] = pos
minetest.sound_play({name="mcl_barrels_default_barrel_open", pos=node_pos, gain=0.5, max_hear_distance=16}, true)
end end
local function close_forms(pos) local function close_forms(pos)
@ -80,6 +81,7 @@ local function update_after_close(pos)
if not node then return end if not node then return end
if node.name == "mcl_barrels:barrel_open" then if node.name == "mcl_barrels:barrel_open" then
minetest.swap_node(pos, {name = "mcl_barrels:barrel_closed", param2 = node.param2}) minetest.swap_node(pos, {name = "mcl_barrels:barrel_closed", param2 = node.param2})
minetest.sound_play({name="mcl_barrels_default_barrel_close", pos=node_pos, gain=0.5, max_hear_distance=16}, true)
end end
end end

View File

@ -0,0 +1,2 @@
barrel-open.ogg and barrel-close.ogg taken from https://freesound.org/people/quantumriver/sounds/552153/
Licence: Creative Commons 0 (CC0)