Add water bottle sounds (pouring and filling)
parent
3af932d6ac
commit
9f138a8014
|
@ -0,0 +1,5 @@
|
||||||
|
License information:
|
||||||
|
|
||||||
|
* Code: WTFPL
|
||||||
|
* Textures: From Faithful 32×32 texture pack (see main MineClone 2 license notes)
|
||||||
|
* Sounds: CC0
|
|
@ -55,6 +55,7 @@ minetest.register_craftitem("mcl_potions:glass_bottle", {
|
||||||
-- Replace with water bottle, if possible, otherwise
|
-- Replace with water bottle, if possible, otherwise
|
||||||
-- place the water potion at a place where's space
|
-- place the water potion at a place where's space
|
||||||
local water_bottle = ItemStack("mcl_potions:potion_water")
|
local water_bottle = ItemStack("mcl_potions:potion_water")
|
||||||
|
minetest.sound_play("mcl_potions_bottle_fill", {pos=pointed_thing.under, gain=0.5, max_hear_range=16})
|
||||||
if itemstack:get_count() == 1 then
|
if itemstack:get_count() == 1 then
|
||||||
return water_bottle
|
return water_bottle
|
||||||
else
|
else
|
||||||
|
@ -115,12 +116,15 @@ minetest.register_craftitem("mcl_potions:potion_water", {
|
||||||
-- Increase water level of cauldron by 1
|
-- Increase water level of cauldron by 1
|
||||||
if node.name == "mcl_cauldrons:cauldron" then
|
if node.name == "mcl_cauldrons:cauldron" then
|
||||||
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_1"})
|
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_1"})
|
||||||
|
minetest.sound_play("mcl_potions_bottle_pour", {pos=pointed_thing.under, gain=0.5, max_hear_range=16})
|
||||||
return "mcl_potions:glass_bottle"
|
return "mcl_potions:glass_bottle"
|
||||||
elseif node.name == "mcl_cauldrons:cauldron_1" then
|
elseif node.name == "mcl_cauldrons:cauldron_1" then
|
||||||
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_2"})
|
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_2"})
|
||||||
|
minetest.sound_play("mcl_potions_bottle_pour", {pos=pointed_thing.under, gain=0.5, max_hear_range=16})
|
||||||
return "mcl_potions:glass_bottle"
|
return "mcl_potions:glass_bottle"
|
||||||
elseif node.name == "mcl_cauldrons:cauldron_2" then
|
elseif node.name == "mcl_cauldrons:cauldron_2" then
|
||||||
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_3"})
|
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron_3"})
|
||||||
|
minetest.sound_play("mcl_potions_bottle_pour", {pos=pointed_thing.under, gain=0.5, max_hear_range=16})
|
||||||
return "mcl_potions:glass_bottle"
|
return "mcl_potions:glass_bottle"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue