mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 17:17:29 +01:00
update to use current mesecons API
requires mesecons commit 5be179bf110b44bdc06df6dbfde4e61487cf0635 or newer.
This commit is contained in:
parent
b49428721a
commit
28cef5e82f
@ -120,7 +120,7 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||
end)
|
||||
|
||||
if minetest.get_modpath("mesecons_mvps") then
|
||||
mesecon:register_on_mvps_move(function(moved_nodes)
|
||||
mesecon.register_on_mvps_move(function(moved_nodes)
|
||||
for _, n in ipairs(moved_nodes) do
|
||||
pipeworks.scan_for_tube_objects(n.pos)
|
||||
pipeworks.scan_for_tube_objects(n.oldpos)
|
||||
|
@ -503,7 +503,7 @@ minetest.register_node("pipeworks:flow_sensor_empty", {
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
if mesecon then
|
||||
mesecon:receptor_off(pos, rules)
|
||||
mesecon.receptor_off(pos, rules)
|
||||
end
|
||||
end,
|
||||
node_box = {
|
||||
@ -544,7 +544,7 @@ minetest.register_node("pipeworks:flow_sensor_loaded", {
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
if mesecon then
|
||||
mesecon:receptor_on(pos, rules)
|
||||
mesecon.receptor_on(pos, rules)
|
||||
end
|
||||
end,
|
||||
node_box = {
|
||||
@ -650,7 +650,7 @@ minetest.register_node("pipeworks:fountainhead", {
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
if mesecon then
|
||||
mesecon:receptor_on(pos, rules)
|
||||
mesecon.receptor_on(pos, rules)
|
||||
end
|
||||
end,
|
||||
node_box = {
|
||||
@ -684,7 +684,7 @@ minetest.register_node("pipeworks:fountainhead_pouring", {
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
if mesecon then
|
||||
mesecon:receptor_on(pos, rules)
|
||||
mesecon.receptor_on(pos, rules)
|
||||
end
|
||||
end,
|
||||
node_box = {
|
||||
|
@ -465,9 +465,9 @@ luaentity.register_entity("pipeworks:tubed_item", {
|
||||
})
|
||||
|
||||
if minetest.get_modpath("mesecons_mvps") then
|
||||
mesecon:register_mvps_unmov("pipeworks:tubed_item")
|
||||
mesecon:register_mvps_unmov("pipeworks:color_entity")
|
||||
mesecon:register_on_mvps_move(function(moved_nodes)
|
||||
mesecon.register_mvps_unmov("pipeworks:tubed_item")
|
||||
mesecon.register_mvps_unmov("pipeworks:color_entity")
|
||||
mesecon.register_on_mvps_move(function(moved_nodes)
|
||||
local moved = {}
|
||||
for _, n in ipairs(moved_nodes) do
|
||||
moved[minetest.hash_node_position(n.oldpos)] = vector.subtract(n.pos, n.oldpos)
|
||||
|
@ -171,7 +171,7 @@ pipeworks.register_tube("pipeworks:teleport_tube","Teleporting Pneumatic Tube Se
|
||||
end})
|
||||
|
||||
if minetest.get_modpath("mesecons_mvps") ~= nil then
|
||||
mesecon:register_on_mvps_move(function(moved_nodes)
|
||||
mesecon.register_on_mvps_move(function(moved_nodes)
|
||||
for _, n in ipairs(moved_nodes) do
|
||||
if string.find(n.node.name, "pipeworks:teleport_tube") ~= nil then
|
||||
update_pos_in_file(n.pos)
|
||||
|
@ -373,7 +373,7 @@ if pipeworks.enable_detector_tube then
|
||||
local fdir = node.param2
|
||||
if nitems == 0 then
|
||||
minetest.set_node(pos, {name = string.gsub(name, "on", "off"), param2 = fdir})
|
||||
mesecon:receptor_off(pos, pipeworks.mesecons_rules)
|
||||
mesecon.receptor_off(pos, pipeworks.mesecons_rules)
|
||||
else
|
||||
meta:set_int("nitems", nitems)
|
||||
end
|
||||
@ -394,7 +394,7 @@ if pipeworks.enable_detector_tube then
|
||||
local name = node.name
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos,{name = string.gsub(name, "off", "on"), param2 = fdir})
|
||||
mesecon:receptor_on(pos, pipeworks.mesecons_rules)
|
||||
mesecon.receptor_on(pos, pipeworks.mesecons_rules)
|
||||
return pipeworks.notvel(pipeworks.meseadjlist, velocity)
|
||||
end},
|
||||
groups = {mesecon = 2},
|
||||
|
Loading…
Reference in New Issue
Block a user