From 2134762ed160b3ea09350426c8dc2b75bf476e30 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 13 Jun 2022 21:42:10 -0400 Subject: [PATCH] More world processor privileges --- core/src/mindustry/logic/LExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index df2e14bbad..2a801d4e79 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -622,7 +622,7 @@ public class LExecutor{ int address = exec.numi(position); Building from = exec.building(target); - if(from instanceof MemoryBuild mem && from.team == exec.team){ + if(from instanceof MemoryBuild mem && (exec.privileged || from.team == exec.team)){ exec.setnum(output, address < 0 || address >= mem.memory.length ? 0 : mem.memory[address]); } @@ -646,7 +646,7 @@ public class LExecutor{ int address = exec.numi(position); Building from = exec.building(target); - if(from instanceof MemoryBuild mem && from.team == exec.team){ + if(from instanceof MemoryBuild mem && (exec.privileged || from.team == exec.team)){ if(address >= 0 && address < mem.memory.length){ mem.memory[address] = exec.num(value); @@ -733,7 +733,7 @@ public class LExecutor{ int sortDir = exec.bool(sortOrder) ? 1 : -1; LogicAI ai = null; - if(base instanceof Ranged r && r.team() == exec.team && + if(base instanceof Ranged r && (exec.privileged || r.team() == exec.team) && (base instanceof Building || (ai = UnitControlI.checkLogicAI(exec, base)) != null)){ //must be a building or a controllable unit float range = r.range();