исправлен звук

This commit is contained in:
Vitaliy Olkhin 2024-11-30 14:55:53 +05:00
parent d3aab548e5
commit f0ba412b5c

View File

@ -1,25 +1,19 @@
--_swap tool____________ --_swap tool____________
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing) minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
pos.y = pos.y pos.y = pos.y --Непонятно зачем?
local name = minetest.get_node(pos).name local name = minetest.get_node(pos).name
if name ~= "default:sand" if name ~= "default:sand" and name ~= "default:silver_sand"
and name ~= "default:silver_sand" and name ~= "default:desert_sand" then
and name ~= "default:desert_sand" then return
return end
end pos.y = pos.y
pos.y = pos.y if puncher:get_wielded_item():get_name() == "summer:rake" then
if puncher:get_wielded_item():get_name() == "summer:rake"
then
minetest.remove_node(pos) minetest.remove_node(pos)
node.name = "summer:sabbia_mare" node.name = "summer:sabbia_mare"
minetest.set_node(pos, node) minetest.set_node(pos, node)
minetest.sound_play("summer_n_swap",{pos=pos, max_hear_distance=10})
minetest.sound_play("summer_n_swap", { end
to_player = "", end )
gain = 2.0,})
end
end )
--SABBIA --SABBIA
@ -38,12 +32,4 @@ groups = {crumbly = 3, falling_node = 1, sand = 1},
minetest.register_tool("summer:rake", { minetest.register_tool("summer:rake", {
description = "rake", description = "rake",
inventory_image = "rake.png", inventory_image = "rake.png",
[[on_place = function(itemstack, user, pointed_thing)
minetest.sound_play("summer_n_swap_2", {
to_player = user:get_player_name() ,
gain = 2.0
})]]
}) })