mesecons/mesecons_random/init.lua

79 lines
2.3 KiB
Lua
Raw Normal View History

-- REMOVESTONE
minetest.register_node("mesecons_random:removestone", {
tiles = {"jeija_removestone.png"},
2017-10-31 22:50:39 +01:00
is_ground_content = false,
inventory_image = minetest.inventorycube("jeija_removestone_inv.png"),
groups = {cracky=3},
2012-08-01 11:58:19 +02:00
description="Removestone",
sounds = mesecon.node_sound_stone_defaults,
mesecons = {effector = {
action_on = function (pos, node)
minetest.remove_node(pos)
mesecon.on_dignode(pos, node)
minetest.check_for_falling(vector.add(pos, vector.new(0, 1, 0)))
end
2017-10-07 00:44:49 +02:00
}},
on_blast = mesecon.on_blastnode,
})
minetest.register_craft({
output = 'mesecons_random:removestone 4',
recipe = {
2022-04-21 14:42:54 +02:00
{"", "mesecons_gamecompat:cobble", ""},
{"mesecons_gamecompat:cobble", "group:mesecon_conductor_craftable", "mesecons_gamecompat:cobble"},
{"", "mesecons_gamecompat:cobble", ""},
}
})
2012-09-27 23:27:34 +02:00
-- GHOSTSTONE
minetest.register_node("mesecons_random:ghoststone", {
2016-05-16 22:24:56 +02:00
description="Ghoststone",
tiles = {"jeija_ghoststone.png"},
2017-10-31 22:50:39 +01:00
is_ground_content = false,
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
groups = {cracky=3},
sounds = mesecon.node_sound_stone_defaults,
2013-02-07 17:30:15 +01:00
mesecons = {conductor = {
state = mesecon.state.off,
rules = mesecon.rules.alldirs,
2013-02-07 17:30:15 +01:00
onstate = "mesecons_random:ghoststone_active"
2017-10-07 00:44:49 +02:00
}},
on_blast = mesecon.on_blastnode,
})
minetest.register_node("mesecons_random:ghoststone_active", {
drawtype = "airlike",
pointable = false,
walkable = false,
diggable = false,
2017-10-31 22:50:39 +01:00
is_ground_content = false,
sunlight_propagates = true,
2013-02-09 01:49:27 +01:00
paramtype = "light",
drop = "mesecons_random:ghoststone",
2013-02-07 17:30:15 +01:00
mesecons = {conductor = {
state = mesecon.state.on,
rules = mesecon.rules.alldirs,
2013-02-07 17:30:15 +01:00
offstate = "mesecons_random:ghoststone"
2013-02-09 01:49:27 +01:00
}},
on_construct = function(pos)
-- remove shadow
local shadowpos = vector.add(pos, vector.new(0, 1, 0))
if (minetest.get_node(shadowpos).name == "air") then
minetest.dig_node(shadowpos)
2013-02-09 01:49:27 +01:00
end
2017-10-07 00:44:49 +02:00
end,
on_blast = mesecon.on_blastnode,
})
minetest.register_craft({
output = 'mesecons_random:ghoststone 4',
recipe = {
2022-04-21 14:42:54 +02:00
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:cobble", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:cobble", "group:mesecon_conductor_craftable", "mesecons_gamecompat:cobble"},
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:cobble", "mesecons_gamecompat:steel_ingot"},
}
})