forked from MineClone5/MineClone5
Play sound after placing seed
This commit is contained in:
parent
56a1a98ce6
commit
ca9f48963c
|
@ -58,8 +58,8 @@ function mcl_farming:place_seed(itemstack, placer, pointed_thing, plantname)
|
||||||
pos= {x=pt.above.x, y=pt.above.y, z=pt.above.z}
|
pos= {x=pt.above.x, y=pt.above.y, z=pt.above.z}
|
||||||
local place_s = minetest.get_node(pos)
|
local place_s = minetest.get_node(pos)
|
||||||
|
|
||||||
|
|
||||||
if string.find(farmland.name, "mcl_farming:soil") and string.find(place_s.name, "air") then
|
if string.find(farmland.name, "mcl_farming:soil") and string.find(place_s.name, "air") then
|
||||||
|
minetest.sound_play(minetest.registered_nodes[plantname].sounds.place, {pos = pos})
|
||||||
minetest.add_node(pos, {name=plantname, param2 = minetest.registered_nodes[plantname].place_param2})
|
minetest.add_node(pos, {name=plantname, param2 = minetest.registered_nodes[plantname].place_param2})
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue