From a313ca8a267c9b0fa6e2eacb9751778600633ac5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 4 Dec 2020 10:44:39 -0500 Subject: [PATCH] Checking if tests fail --- core/src/mindustry/entities/comp/BuildingComp.java | 2 +- core/src/mindustry/world/blocks/logic/LogicBlock.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 7eb81b754c..7bab248bf7 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -197,7 +197,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, //region utility methods public void addPlan(boolean checkPrevious){ - if(!block.rebuildable) return; + if(!block.rebuildable || (team == state.rules.defaultTeam && state.isCampaign() && !block.isVisible())) return; if(self() instanceof ConstructBuild entity){ //update block to reflect the fact that something was being constructed diff --git a/core/src/mindustry/world/blocks/logic/LogicBlock.java b/core/src/mindustry/world/blocks/logic/LogicBlock.java index d8871484ff..fdbb15aea2 100644 --- a/core/src/mindustry/world/blocks/logic/LogicBlock.java +++ b/core/src/mindustry/world/blocks/logic/LogicBlock.java @@ -140,7 +140,7 @@ public class LogicBlock extends Block{ int bytelen = stream.readInt(); - if(bytelen > maxByteLen) throw new RuntimeException("Malformed logic data! Length: " + bytelen); + //if(bytelen > maxByteLen) throw new RuntimeException("Malformed logic data! Length: " + bytelen); byte[] bytes = new byte[bytelen]; stream.readFully(bytes); @@ -202,7 +202,7 @@ public class LogicBlock extends Block{ int version = stream.read(); int bytelen = stream.readInt(); - if(bytelen > maxByteLen) throw new RuntimeException("Malformed logic data! Length: " + bytelen); + //if(bytelen > maxByteLen) throw new RuntimeException("Malformed logic data! Length: " + bytelen); byte[] bytes = new byte[bytelen]; stream.readFully(bytes);