mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-03-21 03:20:38 +01:00
It seems wrong to return if the block is not a conductor, I checked also if is not a efector or eceptor
I am new to this code so maybe I am wrong but this seems to fix my problem. the change is small enough so it should be easy to establish if is good or not.
This commit is contained in:
parent
3bab7cb252
commit
ac94fbd68c
@ -247,7 +247,7 @@ function mesecon:connected_to_pw_src(pos, checked)
|
||||
|
||||
local node = minetest.env:get_node_or_nil(pos)
|
||||
if node == nil then return false, checked end
|
||||
if not mesecon:is_conductor(node.name) then return false, checked end
|
||||
if not( mesecon:is_conductor(node.name) or mesecon:is_receptor_node(node.name) or mesecon:is_effector(node.name) ) then return false, checked end
|
||||
|
||||
if mesecon:is_powered_by_receptor(pos) then --return if conductor is powered
|
||||
return true, checked
|
||||
|
Loading…
x
Reference in New Issue
Block a user