2013-02-11 11:01:13 +01:00
|
|
|
local mesewire_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},
|
|
|
|
}
|
|
|
|
|
2018-06-16 00:12:40 +02:00
|
|
|
-- The sweet taste of a default override
|
2014-04-21 13:27:12 +02:00
|
|
|
minetest.override_item("default:mese", {
|
2013-02-11 11:01:13 +01:00
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.off,
|
|
|
|
onstate = "mesecons_extrawires:mese_powered",
|
|
|
|
rules = mesewire_rules
|
|
|
|
}}
|
|
|
|
})
|
|
|
|
|
2018-06-16 00:12:40 +02:00
|
|
|
-- Now I got my own sweet Mese pixels, let's use those
|
|
|
|
minetest.register_node("mesecons_extrawires:mese_powered", {
|
|
|
|
description = "Meseblock On",
|
|
|
|
tiles = {"mesecons_meseblock_on.png"},
|
|
|
|
light_source = 6,
|
2016-04-26 19:42:34 +02:00
|
|
|
drop = "default:mese",
|
2018-06-16 00:12:40 +02:00
|
|
|
is_ground_content = false,
|
|
|
|
groups = {cracky = 3, level = 2},
|
2013-02-11 11:01:13 +01:00
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.on,
|
|
|
|
offstate = "default:mese",
|
|
|
|
rules = mesewire_rules
|
2018-06-16 00:12:40 +02:00
|
|
|
}}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
-- And now for some insanity
|
|
|
|
-- Lets add an Off state CobbleCon here
|
|
|
|
minetest.register_node("mesecons_extrawires:mese_cobble_off", {
|
|
|
|
description = "Mese Cobble Off",
|
|
|
|
tiles = {"mesecons_cobblecon_off.png"},
|
|
|
|
is_ground_content = false,
|
|
|
|
groups = {cracky = 3, level = 2},
|
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.off,
|
|
|
|
onstate = "mesecons_extrawires:mese_cobble_on",
|
|
|
|
rules = mesewire_rules
|
|
|
|
}}
|
2013-02-11 11:01:13 +01:00
|
|
|
})
|
2016-04-26 19:42:34 +02:00
|
|
|
|
2018-06-16 00:12:40 +02:00
|
|
|
-- Finishing strange with an On state Cobblecon here
|
|
|
|
minetest.register_node("mesecons_extrawires:mese_cobble_on", {
|
|
|
|
description = "Mese Cobble On",
|
|
|
|
tiles = {"mesecons_cobblecon_on.png"},
|
|
|
|
light_source = 4,
|
|
|
|
drop = "mesecons_extrawires:mese_cobble_off",
|
|
|
|
is_ground_content = false,
|
|
|
|
groups = {cracky = 3, level = 2},
|
|
|
|
mesecons = {conductor = {
|
|
|
|
state = mesecon.state.on,
|
|
|
|
offstate = "mesecons_extrawires:mese_cobble_off",
|
|
|
|
rules = mesewire_rules
|
|
|
|
}}
|
|
|
|
})
|
2016-04-26 19:42:34 +02:00
|
|
|
|
2018-06-16 00:12:40 +02:00
|
|
|
-- Ok ok, get out of the kitchen you, here's the recipe
|
|
|
|
minetest.register_craft({
|
|
|
|
output = 'mesecons_extrawires:mese_cobble_off 5',
|
|
|
|
recipe = {
|
|
|
|
{'default:cobble', 'mesecons:wire_00000000_off', 'default:cobble'},
|
|
|
|
{'mesecons:wire_00000000_off', 'default:cobble', 'mesecons:wire_00000000_off'},
|
|
|
|
{'default:cobble', 'mesecons:wire_00000000_off', 'default:cobble'},
|
|
|
|
}
|
|
|
|
})
|