Skip to content
Snippets Groups Projects
Commit 0e346962 authored by Jeija's avatar Jeija
Browse files

Make Mese conductive

parent 7cc803b0
No related branches found
No related tags found
No related merge requests found
......@@ -3,3 +3,4 @@
dofile(minetest.get_modpath("mesecons_extrawires").."/tjunction.lua");
dofile(minetest.get_modpath("mesecons_extrawires").."/corner.lua");
dofile(minetest.get_modpath("mesecons_extrawires").."/vertical.lua");
dofile(minetest.get_modpath("mesecons_extrawires").."/mesewire.lua");
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},
}
minetest.register_node(":default:mese", {
description = "Mese Block",
tiles = {"default_mese_block.png"},
is_ground_content = true,
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "mesecons_extrawires:mese_powered",
rules = mesewire_rules
}}
})
minetest.register_node("mesecons_extrawires:mese_powered", {
tiles = {"default_mese_block.png^[brighten"},
is_ground_content = true,
groups = {cracky=1, not_in_creative_inventory = 1},
sounds = default.node_sound_stone_defaults(),
mesecons = {conductor = {
state = mesecon.state.on,
offstate = "default:mese",
rules = mesewire_rules
}},
drop = "default:mese"
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment