2012-09-27 23:25:58 +02:00
|
|
|
-- REMOVESTONE
|
2012-03-05 19:21:26 +01:00
|
|
|
|
|
|
|
minetest.register_node("mesecons_random:removestone", {
|
2012-08-20 10:12:10 +02:00
|
|
|
tiles = {"jeija_removestone.png"},
|
2012-03-05 19:21:26 +01:00
|
|
|
inventory_image = minetest.inventorycube("jeija_removestone_inv.png"),
|
2012-12-09 00:42:30 +01:00
|
|
|
groups = {cracky=3},
|
2012-08-01 11:58:19 +02:00
|
|
|
description="Removestone",
|
2012-12-09 00:42:30 +01:00
|
|
|
mesecons = {effector = {
|
|
|
|
action_on = function (pos, node)
|
|
|
|
minetest.env:remove_node(pos)
|
|
|
|
mesecon:update_autoconnect(pos)
|
|
|
|
end
|
|
|
|
}}
|
2012-03-05 19:21:26 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2012-09-27 23:25:58 +02:00
|
|
|
output = 'mesecons_random:removestone 4',
|
2012-03-05 19:21:26 +01:00
|
|
|
recipe = {
|
2012-09-27 23:25:58 +02:00
|
|
|
{"", "default:cobble", ""},
|
|
|
|
{"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"},
|
|
|
|
{"", "default:cobble", ""},
|
2012-03-05 19:21:26 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2012-09-27 23:27:34 +02:00
|
|
|
-- GHOSTSTONE
|
2012-09-27 23:25:58 +02:00
|
|
|
|
|
|
|
minetest.register_node("mesecons_random:ghoststone", {
|
|
|
|
description="ghoststone",
|
|
|
|
tiles = {"jeija_ghoststone.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
|
2012-12-09 00:42:30 +01:00
|
|
|
groups = {cracky=3},
|
2012-09-27 23:25:58 +02:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2013-02-07 17:30:15 +01:00
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.off,
|
|
|
|
rules = { --axes
|
|
|
|
{x = -1, y = 0, z = 0},
|
|
|
|
{x = 1, y = 0, z = 0},
|
|
|
|
{x = 0, y = -1, z = 0},
|
|
|
|
{x = 0, y = 1, z = 0},
|
|
|
|
{x = 0, y = 0, z = -1},
|
|
|
|
{x = 0, y = 0, z = 1},
|
|
|
|
},
|
|
|
|
onstate = "mesecons_random:ghoststone_active"
|
2012-12-09 00:42:30 +01:00
|
|
|
}}
|
2012-09-27 23:25:58 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("mesecons_random:ghoststone_active", {
|
|
|
|
drawtype = "airlike",
|
|
|
|
pointable = false,
|
|
|
|
walkable = false,
|
|
|
|
diggable = false,
|
|
|
|
sunlight_propagates = true,
|
2013-02-09 01:49:27 +01:00
|
|
|
paramtype = "light",
|
2013-02-07 17:30:15 +01:00
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.on,
|
|
|
|
rules = {
|
|
|
|
{x = -1, y = 0, z = 0},
|
|
|
|
{x = 1, y = 0, z = 0},
|
|
|
|
{x = 0, y = -1, z = 0},
|
|
|
|
{x = 0, y = 1, z = 0},
|
|
|
|
{x = 0, y = 0, z = -1},
|
|
|
|
{x = 0, y = 0, z = 1},
|
|
|
|
},
|
|
|
|
offstate = "mesecons_random:ghoststone"
|
2013-02-09 01:49:27 +01:00
|
|
|
}},
|
|
|
|
on_construct = function(pos)
|
|
|
|
--remove shadow
|
|
|
|
pos2 = {x = pos.x, y = pos.y + 1, z = pos.z}
|
|
|
|
if ( minetest.env:get_node(pos2).name == "air" ) then
|
|
|
|
minetest.env:dig_node(pos2)
|
|
|
|
end
|
|
|
|
end
|
2012-09-27 23:25:58 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
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"},
|
|
|
|
}
|
|
|
|
})
|