Add more mesecon support

wormholes now emit mesecon energy, allowing mesecons to know the state of the portal.
(mesecons could previously only set the state of the portal)
This commit is contained in:
Treer
2020-01-07 00:08:27 +11:00
committed by SmallJoker
parent 478684062d
commit 3945467152
3 changed files with 54 additions and 8 deletions

View File

@ -58,7 +58,13 @@ minetest.register_node("nether:portal", {
{-0.5, -0.5, -0.1, 0.5, 0.5, 0.1},
},
},
groups = {not_in_creative_inventory = 1}
groups = {not_in_creative_inventory = 1},
mesecons = {receptor = {
state = "on",
rules = function(node)
return nether.get_mesecon_emission_rules_from_colorfacedir(node.param2)
end
}}
})