2024-06-28 15:44:25 +03:00
|
|
|
--_swap tool____________
|
|
|
|
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
2024-11-30 16:48:21 +03:00
|
|
|
pos.y = pos.y --Непонятно зачем?
|
|
|
|
local name = minetest.get_node(pos).name
|
|
|
|
if name ~= "default:sand" and name ~= "default:silver_sand"
|
|
|
|
and name ~= "default:desert_sand" then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
pos.y = pos.y
|
|
|
|
if puncher:get_wielded_item():get_name() == "summer:rake" then
|
|
|
|
minetest.remove_node(pos)
|
|
|
|
node.name = "summer:sabbia_mare"
|
|
|
|
minetest.set_node(pos, node)
|
|
|
|
minetest.sound_play("summer_n_swap",{pos=pos, max_hear_distance=10})
|
|
|
|
end
|
|
|
|
end )
|
2024-06-28 15:44:25 +03:00
|
|
|
|
|
|
|
|
|
|
|
--SABBIA
|
|
|
|
minetest.register_node("summer:sabbia_mare", {
|
|
|
|
description = "Sabbiamare",
|
2024-11-30 16:48:21 +03:00
|
|
|
tiles = {"sabbia_mare_2.png"},
|
2024-06-28 15:44:25 +03:00
|
|
|
--groups = {crumbly = 2, falling_node = 1},
|
2024-11-30 16:48:21 +03:00
|
|
|
--groups = {cracky = 3, stone = 1},
|
2024-06-28 15:44:25 +03:00
|
|
|
drop = 'summer:sabbia_mare',
|
|
|
|
--legacy_mineral = true,
|
2024-11-30 16:48:21 +03:00
|
|
|
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
2024-06-28 15:44:25 +03:00
|
|
|
sounds = default.node_sound_sand_defaults(),
|
|
|
|
--sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_tool("summer:rake", {
|
2024-11-30 16:48:21 +03:00
|
|
|
description = "rake",
|
|
|
|
inventory_image = "rake.png",
|
2024-06-28 15:44:25 +03:00
|
|
|
})
|