forked from minetest-mods/mesecons
Use vector helper functions instead of old builtin cmpPos and addPosRule functions
This commit is contained in:
@ -16,7 +16,7 @@ mesecon.on_placenode = function (pos, node)
|
||||
-- also call receptor_on if itself is powered already, so that neighboring
|
||||
-- conductors will be activated (when pushing an on-conductor with a piston)
|
||||
for _, s in ipairs(sources) do
|
||||
local rule = {x = pos.x - s.x, y = pos.y - s.y, z = pos.z - s.z}
|
||||
local rule = vector.subtract(pos, s)
|
||||
mesecon.turnon(pos, rule)
|
||||
end
|
||||
--mesecon.receptor_on (pos, mesecon.conductor_get_rules(node))
|
||||
|
Reference in New Issue
Block a user