HUGE speed improvement

This commit is contained in:
Jeija 2012-08-12 10:57:00 +02:00
parent d72c0e6bdd
commit 9829abc74d
14 changed files with 72 additions and 71 deletions

@ -88,6 +88,7 @@ mesecon.actions_off={} -- Saves registered function callbacks for mesecon off
mesecon.actions_change={} -- Saves registered function callbacks for mesecon change mesecon.actions_change={} -- Saves registered function callbacks for mesecon change
mesecon.pwr_srcs={} mesecon.pwr_srcs={}
mesecon.pwr_srcs_off={} mesecon.pwr_srcs_off={}
mesecon.effectors={}
mesecon.rules={} mesecon.rules={}
mesecon.conductors={} mesecon.conductors={}
@ -135,7 +136,21 @@ function mesecon:receptor_on(pos, rules)
end end
function mesecon:receptor_off(pos, rules) function mesecon:receptor_off(pos, rules)
mesecon:turnoff(pos, 0, 0, 0, true, rules) if rules == nil then
rules = mesecon:get_rules("default")
end
local i = 1
while rules[i]~=nil do
local np = {}
np.x = pos.x + rules[i].x
np.y = pos.y + rules[i].y
np.z = pos.z + rules[i].z
if mesecon:connected_to_pw_src(np, 0, 0, 0, {}) == false then
mesecon:turnoff(np)
end
i=i+1
end
end end
function mesecon:register_on_signal_on(action) function mesecon:register_on_signal_on(action)

@ -161,7 +161,6 @@ function mesecon:is_conductor_off(name)
return false return false
end end
--Rules rotation Functions: --Rules rotation Functions:
function mesecon:rotate_rules_right(rules) function mesecon:rotate_rules_right(rules)
local i=1 local i=1
@ -257,49 +256,38 @@ function mesecon:turnon(p, x, y, z, firstcall, rules)
end end
end end
function mesecon:turnoff(pos, x, y, z, firstcall, rules) function mesecon:turnoff(pos)
if rules==nil then local node = minetest.env:get_node(pos)
rules=mesecon:get_rules("default")
end
local lpos = {}
lpos.x=pos.x+x
lpos.y=pos.y+y
lpos.z=pos.z+z
local node = minetest.env:get_node(lpos)
local connected = 0 local connected = 0
local checked = {}
--Send Signals to effectors: if minetest.get_item_group(node.name, "mesecon_effector_on") == 1 then
mesecon:changesignal(lpos) if not mesecon:check_if_turnon(pos) then --Check if the signal comes from another source
if not mesecon:check_if_turnon(lpos) then --Send Signals to effectors:
mesecon:deactivate(lpos) mesecon:deactivate(pos)
end end
mesecon:changesignal(pos) --Changesignal is always thrown because nodes can be both receptors and effectors
if not(firstcall) and connected==0 then
connected=mesecon:connected_to_pw_src(lpos, 0, 0, 0, checked)
end
if connected == 0 and mesecon:is_conductor_on(node.name) then
--minetest.env:remove_node(lpos)
minetest.env:add_node(lpos, {name=mesecon:get_conductor_off(node.name)})
nodeupdate(lpos)
end end
if mesecon:is_conductor_on(node.name) or firstcall then if mesecon:is_conductor_on(node.name) then
if connected == 0 then minetest.env:add_node(pos, {name=mesecon:get_conductor_off(node.name)})
local i=1 nodeupdate(pos)
while rules[i]~=nil do
mesecon:turnoff(lpos, rules[i].x, rules[i].y, rules[i].z, false) rules = mesecon:get_rules("default")
i=i+1 local i=1
end while rules[i]~=nil do
local np = {}
np.x = pos.x + rules[i].x
np.y = pos.y + rules[i].y
np.z = pos.z + rules[i].z
mesecon:turnoff(np)
i=i+1
end end
end end
end end
function mesecon:connected_to_pw_src(pos, x, y, z, checked, firstcall) function mesecon:connected_to_pw_src(pos, x, y, z, checked)
local i=1 local i=1
local lpos = {} local lpos = {}
@ -315,7 +303,7 @@ function mesecon:connected_to_pw_src(pos, x, y, z, checked, firstcall)
i=i+1 i=i+1
if checked[i]==nil then checked[i]={} break end if checked[i]==nil then checked[i]={} break end
if checked[i].x==lpos.x and checked[i].y==lpos.y and checked[i].z==lpos.z then if checked[i].x==lpos.x and checked[i].y==lpos.y and checked[i].z==lpos.z then
return 0 return false
end end
until false until false
@ -324,23 +312,19 @@ function mesecon:connected_to_pw_src(pos, x, y, z, checked, firstcall)
checked[i].z=lpos.z checked[i].z=lpos.z
if mesecon:is_receptor_node(node.name, lpos, pos) == true then -- receptor nodes (power sources) can be added using mesecon:add_receptor_node if mesecon:is_receptor_node(node.name, lpos, pos) == true then -- receptor nodes (power sources) can be added using mesecon:add_receptor_node
return 1 return true
end end
if mesecon:is_conductor_on(node.name) or firstcall then -- add other conductors here if mesecon:is_conductor_on(node.name) then
local pw_source_found=0
local rules=mesecon:get_rules("default") local rules=mesecon:get_rules("default")
local i=1 local i=1
while rules[i]~=nil do while rules[i]~=nil do
pw_source_found=pw_source_found+mesecon:connected_to_pw_src(lpos, rules[i].x, rules[i].y, rules[i].z, checked, false) if mesecon:connected_to_pw_src(lpos, rules[i].x, rules[i].y, rules[i].z, checked) == true then return true end
i=i+1 i=i+1
end end
if pw_source_found > 0 then
return 1
end
end end
end end
return 0 return false
end end
function mesecon:check_if_turnon(pos) function mesecon:check_if_turnon(pos)
@ -378,7 +362,7 @@ function mesecon:updatenode(pos)
if mesecon:connected_to_pw_src(pos, 0, 0, 0, {}) then if mesecon:connected_to_pw_src(pos, 0, 0, 0, {}) then
mesecon:turnon(pos, 0, 0, 0) mesecon:turnon(pos, 0, 0, 0)
else else
mesecon:turnoff(pos, 0, 0, 0) mesecon:turnoff(pos)
end end
end end
@ -396,7 +380,9 @@ end)
minetest.register_on_dignode( minetest.register_on_dignode(
function(pos, oldnode, digger) function(pos, oldnode, digger)
if mesecon:is_conductor_on(oldnode.name) then if mesecon:is_conductor_on(oldnode.name) then
mesecon:turnoff(pos, 0, 0, 0, true) local i = 1
mesecon:receptor_off(pos)
end end
end end
) )

@ -19,7 +19,7 @@ for i = 1, 5 do
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}, },
groups = {dig_immediate=2, mesecon = 2}, groups = {dig_immediate=2, mesecon = 2, mesecon_effector_on = 1},
description="Battery", description="Battery",
}) })
mesecon:add_receptor_node_off("mesecons_battery:battery_charging_"..i) mesecon:add_receptor_node_off("mesecons_battery:battery_charging_"..i)
@ -46,7 +46,7 @@ for i = 1, 5 do
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}, },
groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon = 2}, groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 2, mesecon_effector_off = 1},
description="Battery", description="Battery",
}) })
mesecon:add_receptor_node("mesecons_battery:battery_discharging_"..i) mesecon:add_receptor_node("mesecons_battery:battery_discharging_"..i)

@ -1,9 +1,9 @@
for i = 1, 4 do for i = 1, 4 do
local groups = {} local groups = {}
if i == 1 then if i == 1 then
groups = {bendy=2,snappy=1,dig_immediate=2, mesecon = 2} groups = {bendy=2,snappy=1,dig_immediate=2, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2}
else else
groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1, mesecon = 2} groups = {bendy=2,snappy=1,dig_immediate=2, mesecon_effector_on = 1, mesecon_effector_off = 1, not_in_creative_inventory=1, mesecon = 2}
end end
boxes = {{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab boxes = {{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab

@ -20,7 +20,7 @@ minetest.register_node("mesecons_lamp:lamp_on", {
wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125},
wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125},
}, },
groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon = 2}, groups = {dig_immediate=3,not_in_creative_inventory=1, mesecon_effector_on = 1, mesecon = 2},
drop='"mesecons_lamp:lamp_off" 1', drop='"mesecons_lamp:lamp_off" 1',
}) })
@ -45,7 +45,7 @@ minetest.register_node("mesecons_lamp:lamp_off", {
wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125},
wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125},
}, },
groups = {dig_immediate=3, mesecon = 2}, groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon = 2},
description="Meselamp", description="Meselamp",
}) })

@ -2,13 +2,13 @@ function mesecon:lightstone_add(name, base_item, texture_off, texture_on)
minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_off", { minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_off", {
tile_images = {texture_off}, tile_images = {texture_off},
inventory_image = minetest.inventorycube(texture_off), inventory_image = minetest.inventorycube(texture_off),
groups = {cracky=2, mesecon = 2}, groups = {cracky=2, mesecon_effector_off = 1, mesecon = 2},
description=name.." Lightstone", description=name.." Lightstone",
}) })
minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_on", { minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_on", {
tile_images = {texture_on}, tile_images = {texture_on},
inventory_image = minetest.inventorycube(texture_on), inventory_image = minetest.inventorycube(texture_on),
groups = {cracky=2,not_in_creative_inventory=1, mesecon = 2}, groups = {cracky=2,not_in_creative_inventory=1, mesecon_effector_on = 1, mesecon = 2},
drop = "node mesecons_lightstone:lightstone_" .. name .. "_off 1", drop = "node mesecons_lightstone:lightstone_" .. name .. "_off 1",
light_source = LIGHT_MAX-2, light_source = LIGHT_MAX-2,
description=name.." Lightstone", description=name.." Lightstone",

@ -6,9 +6,9 @@ for c = 0, 1 do
for d = 0, 1 do for d = 0, 1 do
local nodename = "mesecons_microcontroller:microcontroller"..tostring(d)..tostring(c)..tostring(b)..tostring(a) local nodename = "mesecons_microcontroller:microcontroller"..tostring(d)..tostring(c)..tostring(b)..tostring(a)
if tostring(d)..tostring(c)..tostring(b)..tostring(a) ~= "0000" then if tostring(d)..tostring(c)..tostring(b)..tostring(a) ~= "0000" then
groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 2} groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2}
else else
groups = {dig_immediate=2, mesecon = 2} groups = {dig_immediate=2, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2}
end end
minetest.register_node(nodename, { minetest.register_node(nodename, {
description = "Microcontroller", description = "Microcontroller",

@ -39,7 +39,7 @@ minetest.register_node("mesecons_movestones:movestone", {
tile_images = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_arrows.png", "jeija_movestone_arrows.png"}, tile_images = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_arrows.png", "jeija_movestone_arrows.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
legacy_facedir_simple = true, legacy_facedir_simple = true,
groups = {cracky=3}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1},
description="Movestone", description="Movestone",
}) })
@ -116,7 +116,7 @@ minetest.register_node("mesecons_movestones:sticky_movestone", {
inventory_image = minetest.inventorycube("jeija_sticky_movestone.png", "jeija_movestone_side.png", "jeija_movestone_side.png"), inventory_image = minetest.inventorycube("jeija_sticky_movestone.png", "jeija_movestone_side.png", "jeija_movestone_side.png"),
paramtype2 = "facedir", paramtype2 = "facedir",
legacy_facedir_simple = true, legacy_facedir_simple = true,
groups = {cracky=3}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1},
description="Sticky Movestone", description="Sticky Movestone",
}) })

@ -1,7 +1,7 @@
minetest.register_node("mesecons_noteblock:noteblock", { minetest.register_node("mesecons_noteblock:noteblock", {
description = "Noteblock", description = "Noteblock",
tile_images = {"mesecons_noteblock.png"}, tile_images = {"mesecons_noteblock.png"},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon = 2}, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, mesecon_effector_off = 1, mesecon = 2},
drawtype = "allfaces_optional", drawtype = "allfaces_optional",
visual_scale = 1.3, visual_scale = 1.3,
paramtype="light", paramtype="light",

@ -3,7 +3,7 @@
minetest.register_node("mesecons_pistons:piston_normal", { minetest.register_node("mesecons_pistons:piston_normal", {
description = "Piston", description = "Piston",
tiles = {"jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_side.png"}, tiles = {"jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_side.png"},
groups = {cracky=3, mesecon = 2}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
paramtype2 = "facedir", paramtype2 = "facedir",
after_dig_node = function(pos, oldnode) after_dig_node = function(pos, oldnode)
local dir = mesecon:piston_get_direction(oldnode) local dir = mesecon:piston_get_direction(oldnode)
@ -23,7 +23,7 @@ minetest.register_node("mesecons_pistons:piston_normal", {
minetest.register_node("mesecons_pistons:piston_sticky", { minetest.register_node("mesecons_pistons:piston_sticky", {
description = "Sticky Piston", description = "Sticky Piston",
tiles = {"jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_sticky_side.png"}, tiles = {"jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_sticky_side.png"},
groups = {cracky=3, mesecon = 2}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
paramtype2 = "facedir", paramtype2 = "facedir",
after_dig_node = function(pos, oldnode) after_dig_node = function(pos, oldnode)
local dir = mesecon:piston_get_direction(oldnode) local dir = mesecon:piston_get_direction(oldnode)

@ -3,7 +3,7 @@
minetest.register_node("mesecons_pistons:piston_down_normal", { minetest.register_node("mesecons_pistons:piston_down_normal", {
description = "Piston DOWN", description = "Piston DOWN",
tiles = {"jeija_piston_tb.png", "jeija_piston_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"}, tiles = {"jeija_piston_tb.png", "jeija_piston_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"},
groups = {cracky=3, mesecon = 2}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
after_dig_node = function(pos, oldnode) after_dig_node = function(pos, oldnode)
local dir = {x=0, y=-1, z=0} local dir = {x=0, y=-1, z=0}
pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check
@ -22,7 +22,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal", {
minetest.register_node("mesecons_pistons:piston_down_sticky", { minetest.register_node("mesecons_pistons:piston_down_sticky", {
description = "Sticky Piston DOWN", description = "Sticky Piston DOWN",
tiles = {"jeija_piston_tb.png", "jeija_piston_sticky_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"}, tiles = {"jeija_piston_tb.png", "jeija_piston_sticky_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"},
groups = {cracky=3, mesecon = 2}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
after_dig_node = function(pos, oldnode) after_dig_node = function(pos, oldnode)
local dir = {x=0, y=-1, z=0} local dir = {x=0, y=-1, z=0}
pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check

@ -3,7 +3,7 @@
minetest.register_node("mesecons_pistons:piston_up_normal", { minetest.register_node("mesecons_pistons:piston_up_normal", {
description = "Piston UP", description = "Piston UP",
tiles = {"jeija_piston_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"}, tiles = {"jeija_piston_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"},
groups = {cracky=3, mesecon = 2}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
after_dig_node = function(pos, oldnode) after_dig_node = function(pos, oldnode)
local dir = {x=0, y=1, z=0} local dir = {x=0, y=1, z=0}
pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check
@ -22,7 +22,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal", {
minetest.register_node("mesecons_pistons:piston_up_sticky", { minetest.register_node("mesecons_pistons:piston_up_sticky", {
description = "Sticky Piston UP", description = "Sticky Piston UP",
tiles = {"jeija_piston_sticky_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"}, tiles = {"jeija_piston_sticky_side.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png", "jeija_piston_tb.png"},
groups = {cracky=3, mesecon = 2}, groups = {cracky=3, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
after_dig_node = function(pos, oldnode) after_dig_node = function(pos, oldnode)
local dir = {x=0, y=1, z=0} local dir = {x=0, y=1, z=0}
pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check pos.x, pos.y, pos.z = pos.x + dir.x, pos.y + dir.y, pos.z + dir.z --move to first node to check

@ -4,7 +4,7 @@ minetest.register_node("mesecons_random:removestone", {
tile_images = {"jeija_removestone.png"}, tile_images = {"jeija_removestone.png"},
inventory_image = minetest.inventorycube("jeija_removestone_inv.png"), inventory_image = minetest.inventorycube("jeija_removestone_inv.png"),
material = minetest.digprop_stonelike(1.0), material = minetest.digprop_stonelike(1.0),
groups = {cracky=3, mesecon = 2}, groups = {cracky=3, mesecon_effector_off = 1, mesecon = 2},
description="Removestone", description="Removestone",
}) })

@ -105,7 +105,7 @@ minetest.register_node("mesecons_temperest:mesecon_plug", {
tile_images = {"jeija_mesecon_plug.png"}, tile_images = {"jeija_mesecon_plug.png"},
inventory_image = "jeija_mesecon_plug.png", inventory_image = "jeija_mesecon_plug.png",
wield_image = "jeija_mesecon_plug.png", wield_image = "jeija_mesecon_plug.png",
groups = {dig_immediate=2, mesecon = 2}, groups = {dig_immediate=2, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
walkable = false, walkable = false,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -139,7 +139,7 @@ minetest.register_node("mesecons_temperest:mesecon_socket_off", {
tile_images = {"jeija_mesecon_socket_off.png"}, tile_images = {"jeija_mesecon_socket_off.png"},
inventory_image = "jeija_mesecon_socket_off.png", inventory_image = "jeija_mesecon_socket_off.png",
wield_image = "jeija_mesecon_socket_off.png", wield_image = "jeija_mesecon_socket_off.png",
groups = {dig_immediate=2, mesecon = 2}, groups = {dig_immediate=2, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
walkable = false, walkable = false,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -156,7 +156,7 @@ minetest.register_node("mesecons_temperest:mesecon_socket_on", {
paramtype = "light", paramtype = "light",
is_ground_content = true, is_ground_content = true,
tile_images = {"jeija_mesecon_socket_on.png"}, tile_images = {"jeija_mesecon_socket_on.png"},
groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon = 2}, groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
walkable = false, walkable = false,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -191,7 +191,7 @@ if ENABLE_TEMPEREST then
paramtype = "light", paramtype = "light",
is_ground_content = true, is_ground_content = true,
tile_images = {"jeija_mesecon_inverter_off.png"}, tile_images = {"jeija_mesecon_inverter_off.png"},
groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon = 2}, groups = {dig_immediate=2,not_in_creative_inventory=1, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
walkable = false, walkable = false,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -212,7 +212,7 @@ if ENABLE_TEMPEREST then
tile_images = {"jeija_mesecon_inverter_on.png"}, tile_images = {"jeija_mesecon_inverter_on.png"},
inventory_image = "jeija_mesecon_inverter_on.png", inventory_image = "jeija_mesecon_inverter_on.png",
wield_image = "jeija_mesecon_inverter_on.png", wield_image = "jeija_mesecon_inverter_on.png",
groups = {dig_immediate=2, mesecon = 2}, groups = {dig_immediate=2, mesecon_effector_on = 1, mesecon_effector_off = 1, mesecon = 2},
walkable = false, walkable = false,
selection_box = { selection_box = {
type = "fixed", type = "fixed",