Use vector helper functions instead of old builtin cmpPos and addPosRule functions

This commit is contained in:
Jeija
2016-02-14 20:55:50 +01:00
parent 6b54f025c1
commit 809192f353
12 changed files with 44 additions and 56 deletions

View File

@ -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))