From 66594a2b327c6b88def86b9ff7a128e5aac58a26 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 28 Mar 2021 09:41:08 -0400 Subject: [PATCH] Fixed #5012 --- core/src/mindustry/logic/LExecutor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index db6ebf12a7..17d48b7376 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -489,7 +489,7 @@ public class LExecutor{ Building build = exec.building(p1); int dropped = Math.min(unit.stack.amount, exec.numi(p2)); - if(build != null && build.isValid() && dropped > 0 && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){ + if(build != null && build.team == unit.team && build.isValid() && dropped > 0 && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){ int accepted = build.acceptStack(unit.item(), dropped, unit); if(accepted > 0){ Call.transferItemTo(unit, unit.item(), accepted, unit.x, unit.y, build); @@ -503,7 +503,8 @@ public class LExecutor{ Building build = exec.building(p1); int amount = exec.numi(p3); - if(build != null && build.isValid() && build.items != null && exec.obj(p2) instanceof Item item && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){ + if(build != null && build.team == unit.team && build.isValid() && build.items != null && + exec.obj(p2) instanceof Item item && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){ int taken = Math.min(build.items.get(item), Math.min(amount, unit.maxAccepted(item))); if(taken > 0){