mesecons/mesecons_random/init.lua

63 lines
1.6 KiB
Lua

-- REMOVESTONE
minetest.register_node("mesecons_random:removestone", {
tiles = {"jeija_removestone.png"},
inventory_image = minetest.inventorycube("jeija_removestone_inv.png"),
groups = {cracky=3},
description="Removestone",
mesecons = {effector = {
action_on = function (pos, node)
minetest.env:remove_node(pos)
mesecon:update_autoconnect(pos)
end
}}
})
minetest.register_craft({
output = 'mesecons_random:removestone 4',
recipe = {
{"", "default:cobble", ""},
{"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"},
{"", "default:cobble", ""},
}
})
-- GHOSTSTONE
minetest.register_node("mesecons_random:ghoststone", {
description="ghoststone",
tiles = {"jeija_ghoststone.png"},
is_ground_content = true,
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
mesecons = {effector = {
action_on = function (pos, node)
minetest.env:add_node(pos, {name="mesecons_random:ghoststone_active"})
end
}}
})
minetest.register_node("mesecons_random:ghoststone_active", {
drawtype = "airlike",
pointable = false,
walkable = false,
diggable = false,
sunlight_propagates = true,
mesecons = {effector = {
action_off = function (pos, node)
minetest.env:add_node(pos, {name="mesecons_random:ghoststone"})
end
}}
})
minetest.register_craft({
output = 'mesecons_random:ghoststone 4',
recipe = {
{"default:steel_ingot", "default:cobble", "default:steel_ingot"},
{"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"},
{"default:steel_ingot", "default:cobble", "default:steel_ingot"},
}
})