Fix bug in mesecon.find_receptor that caused false turnoffs and rewrite lever +

switch
This commit is contained in:
Jeija
2014-11-22 20:49:54 +01:00
parent a550323fea
commit 80d136125e
5 changed files with 62 additions and 71 deletions

View File

@ -486,9 +486,10 @@ function mesecon.find_receptor_on(pos, link)
local links = mesecon.rules_link_rule_all_inverted(f.pos, r)
for _, l in ipairs(links) do
if not checked[f.pos.x .. f.pos.y .. f.pos.z] then
local checkedstring = np.x..np.y..np.z..l.x..l.y..l.z
if not checked[checkedstring] then
table.insert(frontiers, {pos = np, link = l})
checked[f.pos.x .. f.pos.y .. f.pos.z] = true
checked[checkedstring] = true
end
end
end