summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDesour <vorunbekannt75@web.de>2021-03-25 18:54:21 +0100
committersfan5 <sfan5@live.de>2021-03-25 23:21:37 +0100
commit69d4a9584d4d9e5ccd31a3c71464ba539f10d91d (patch)
tree0036b67a89e049bc85e0481015908f6e29a74dc5
parent3f75c06a3bf80a4c50ccb0991b3664c491c0d523 (diff)
downloadmesecons-69d4a9584d4d9e5ccd31a3c71464ba539f10d91d.tar
mesecons-69d4a9584d4d9e5ccd31a3c71464ba539f10d91d.tar.gz
mesecons-69d4a9584d4d9e5ccd31a3c71464ba539f10d91d.tar.bz2
mesecons-69d4a9584d4d9e5ccd31a3c71464ba539f10d91d.tar.xz
mesecons-69d4a9584d4d9e5ccd31a3c71464ba539f10d91d.zip
Fix on-state effector-receptor combos (eg. gates) recepting to everywhere
-rw-r--r--mesecons/internal.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesecons/internal.lua b/mesecons/internal.lua
index 93eccf9..ba19e5b 100644
--- a/mesecons/internal.lua
+++ b/mesecons/internal.lua
@@ -449,8 +449,10 @@ function mesecon.turnoff(pos, link)
-- Check if an onstate receptor is connected. If that is the case,
-- abort this turnoff process by returning false. `receptor_off` will
-- discard all the changes that we made in the voxelmanip:
- if mesecon.is_receptor_on(mesecon.get_node_force(np).name) then
- return false
+ if mesecon.rules_link_rule_all_inverted(f.pos, r)[1] then
+ if mesecon.is_receptor_on(mesecon.get_node_force(np).name) then
+ return false
+ end
end
-- Call turnoff on neighbors