2022-12-01 18:33:19 +01:00
|
|
|
local S = minetest.get_translator(minetest.get_current_modname())
|
|
|
|
|
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"},
|
2017-10-31 22:50:39 +01:00
|
|
|
is_ground_content = false,
|
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},
|
2022-12-01 18:33:19 +01:00
|
|
|
description = S("Removestone"),
|
2022-05-05 16:57:53 +02:00
|
|
|
sounds = mesecon.node_sound.stone,
|
2012-12-09 00:42:30 +01:00
|
|
|
mesecons = {effector = {
|
|
|
|
action_on = function (pos, node)
|
2013-12-01 04:13:00 +01:00
|
|
|
minetest.remove_node(pos)
|
2016-08-23 07:20:46 +02:00
|
|
|
mesecon.on_dignode(pos, node)
|
2017-10-04 00:19:09 +02:00
|
|
|
minetest.check_for_falling(vector.add(pos, vector.new(0, 1, 0)))
|
2012-12-09 00:42:30 +01:00
|
|
|
end
|
2017-10-07 00:44:49 +02:00
|
|
|
}},
|
|
|
|
on_blast = mesecon.on_blastnode,
|
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 = {
|
2022-05-05 16:57:53 +02:00
|
|
|
{"", "mesecons_gamecompat:cobble", ""},
|
|
|
|
{"mesecons_gamecompat:cobble", "group:mesecon_conductor_craftable", "mesecons_gamecompat:cobble"},
|
|
|
|
{"", "mesecons_gamecompat: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", {
|
2022-12-01 18:33:19 +01:00
|
|
|
description = S("Ghoststone"),
|
2012-09-27 23:25:58 +02:00
|
|
|
tiles = {"jeija_ghoststone.png"},
|
2017-10-31 22:50:39 +01:00
|
|
|
is_ground_content = false,
|
2012-09-27 23:25:58 +02:00
|
|
|
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
|
2012-12-09 00:42:30 +01:00
|
|
|
groups = {cracky=3},
|
2022-05-05 16:57:53 +02:00
|
|
|
sounds = mesecon.node_sound.stone,
|
2013-02-07 17:30:15 +01:00
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.off,
|
2017-10-04 00:19:09 +02:00
|
|
|
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,
|
2012-09-27 23:25:58 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
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,
|
2012-09-27 23:25:58 +02:00
|
|
|
sunlight_propagates = true,
|
2013-02-09 01:49:27 +01:00
|
|
|
paramtype = "light",
|
2017-02-15 23:00:02 +01:00
|
|
|
drop = "mesecons_random:ghoststone",
|
2013-02-07 17:30:15 +01:00
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.on,
|
2017-10-04 00:19:09 +02:00
|
|
|
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)
|
2016-02-14 20:55:50 +01:00
|
|
|
-- remove shadow
|
2022-02-12 20:12:12 +01:00
|
|
|
local shadowpos = vector.add(pos, vector.new(0, 1, 0))
|
2016-02-14 20:55:50 +01:00
|
|
|
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,
|
2012-09-27 23:25:58 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = 'mesecons_random:ghoststone 4',
|
|
|
|
recipe = {
|
2022-05-05 16:57:53 +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"},
|
2012-09-27 23:25:58 +02:00
|
|
|
}
|
|
|
|
})
|