mirror of
https://repo.or.cz/minetest_wateringcan.git
synced 2024-11-27 09:43:47 +01:00
Add watering sound
This commit is contained in:
parent
7f4c309130
commit
2f3b8566b0
@ -40,4 +40,5 @@ There are only optional dependencies:
|
|||||||
|
|
||||||
However, it recommended to use at least one of these mods, otherwise you have nothing to use the watering can on. ;-)
|
However, it recommended to use at least one of these mods, otherwise you have nothing to use the watering can on. ;-)
|
||||||
|
|
||||||
|
## License
|
||||||
|
WTFPL.
|
||||||
|
1
init.lua
1
init.lua
@ -50,6 +50,7 @@ minetest.register_tool("wateringcan:wateringcan_water", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
if watered then
|
if watered then
|
||||||
|
minetest.sound_play({name = "wateringcan_pour", gain = 0.25, max_hear_distance = 10}, { pos = user:getpos() })
|
||||||
wear = itemstack:get_wear()
|
wear = itemstack:get_wear()
|
||||||
wear = wear + 2849 -- 24 uses
|
wear = wear + 2849 -- 24 uses
|
||||||
if(wear > 65535) then
|
if(wear > 65535) then
|
||||||
|
BIN
sounds/wateringcan_pour.1.ogg
Normal file
BIN
sounds/wateringcan_pour.1.ogg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user