forked from minetest-mods/mesecons
Fix inverter states.
This commit is contained in:
parent
fd81543d2b
commit
a9152327a2
@ -76,6 +76,7 @@ end
|
|||||||
mesecon:register_on_signal_on(plug_on)
|
mesecon:register_on_signal_on(plug_on)
|
||||||
mesecon:register_on_signal_off(plug_off)
|
mesecon:register_on_signal_off(plug_off)
|
||||||
|
|
||||||
|
minetest.register_on_placenode(plug_off)
|
||||||
minetest.register_on_dignode(plug_off)
|
minetest.register_on_dignode(plug_off)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -114,7 +115,7 @@ minetest.register_node("jeija:mesecon_socket_on", {
|
|||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
},
|
},
|
||||||
drop='node "jeija:mesecon_socket_off" 1',
|
drop='"jeija:mesecon_socket_off" 1',
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_on_dignode(
|
minetest.register_on_dignode(
|
||||||
@ -140,13 +141,26 @@ minetest.register_craft({
|
|||||||
--TEMPEREST-INVERTER
|
--TEMPEREST-INVERTER
|
||||||
|
|
||||||
minetest.register_node("jeija:mesecon_inverter_off", {
|
minetest.register_node("jeija:mesecon_inverter_off", {
|
||||||
description = "Inverter",
|
|
||||||
drawtype = "raillike",
|
drawtype = "raillike",
|
||||||
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"},
|
||||||
inventory_image = "jeija_mesecon_inverter_off.png",
|
material = minetest.digprop_constanttime(0.1),
|
||||||
wield_image = "jeija_mesecon_inverter_off.png",
|
walkable = false,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
},
|
||||||
|
drop='"jeija:mesecon_inverter_on" 1',
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("jeija:mesecon_inverter_on", {
|
||||||
|
description = "Inverter",
|
||||||
|
drawtype = "raillike",
|
||||||
|
paramtype = "light",
|
||||||
|
is_ground_content = true,
|
||||||
|
tile_images = {"jeija_mesecon_inverter_on.png"},
|
||||||
|
inventory_image = "jeija_mesecon_inverter_on.png",
|
||||||
|
wield_image = "jeija_mesecon_inverter_on.png",
|
||||||
material = minetest.digprop_constanttime(0.1),
|
material = minetest.digprop_constanttime(0.1),
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -154,18 +168,10 @@ minetest.register_node("jeija:mesecon_inverter_off", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("jeija:mesecon_inverter_on", {
|
minetest.register_on_placenode(function(pos, node)
|
||||||
drawtype = "raillike",
|
mesecon:receptor_on(pos)
|
||||||
paramtype = "light",
|
end
|
||||||
is_ground_content = true,
|
)
|
||||||
tile_images = {"jeija_mesecon_inverter_on.png"},
|
|
||||||
material = minetest.digprop_constanttime(0.1),
|
|
||||||
walkable = false,
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
},
|
|
||||||
drop='node "jeija:mesecon_inverter_off" 1',
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_on_dignode(
|
minetest.register_on_dignode(
|
||||||
function(pos, oldnode, digger)
|
function(pos, oldnode, digger)
|
||||||
@ -179,7 +185,7 @@ mesecon:add_receptor_node("jeija:mesecon_inverter_on")
|
|||||||
mesecon:add_receptor_node_off("jeija:mesecon_inverter_off")
|
mesecon:add_receptor_node_off("jeija:mesecon_inverter_off")
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'node "jeija:mesecon_inverter_off" 2',
|
output = 'node "jeija:mesecon_inverter_on" 2',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'node "jeija:mesecon_off"', 'craft "default:steel_ingot"', 'node "jeija:mesecon_off"'},
|
{'node "jeija:mesecon_off"', 'craft "default:steel_ingot"', 'node "jeija:mesecon_off"'},
|
||||||
{'craft "default:steel_ingot"', '', 'craft "default:steel_ingot"'},
|
{'craft "default:steel_ingot"', '', 'craft "default:steel_ingot"'},
|
||||||
|
Loading…
Reference in New Issue
Block a user