Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'ssieb-master'
  • Loading branch information
Jeija committed Feb 23, 2016
2 parents c7428d8 + 4b90392 commit 2dc8101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesecons/internal.lua
Expand Up @@ -357,15 +357,15 @@ end

function mesecon.is_power_on(pos, rulename)
local node = mesecon.get_node_force(pos)
if mesecon.is_conductor_on(node, rulename) or mesecon.is_receptor_on(node.name) then
if node and (mesecon.is_conductor_on(node, rulename) or mesecon.is_receptor_on(node.name)) then
return true
end
return false
end

function mesecon.is_power_off(pos, rulename)
local node = mesecon.get_node_force(pos)
if mesecon.is_conductor_off(node, rulename) or mesecon.is_receptor_off(node.name) then
if node and (mesecon.is_conductor_off(node, rulename) or mesecon.is_receptor_off(node.name)) then
return true
end
return false
Expand Down

0 comments on commit 2dc8101

Please sign in to comment.