From e1f0564d0b405cadf2b172e71f3b0d5081c30b42 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 13 Aug 2020 14:02:11 -0400 Subject: [PATCH] More instruction limits --- core/src/mindustry/logic/LAssembler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/logic/LAssembler.java b/core/src/mindustry/logic/LAssembler.java index d685260744..15521e4f39 100644 --- a/core/src/mindustry/logic/LAssembler.java +++ b/core/src/mindustry/logic/LAssembler.java @@ -8,6 +8,7 @@ import mindustry.gen.*; import mindustry.logic.LExecutor.*; import mindustry.logic.LStatements.*; import mindustry.type.*; +import mindustry.world.blocks.logic.*; /** "Compiles" a sequence of statements into instructions. */ public class LAssembler{ @@ -65,7 +66,7 @@ public class LAssembler{ } public static Seq read(String data){ - return read(data, Integer.MAX_VALUE); + return read(data, LogicBlock.maxInstructions); } public static Seq read(String data, int max){ @@ -79,7 +80,7 @@ public class LAssembler{ //comments if(line.startsWith("#")) continue; - if(index++ > max) continue; + if(index++ > max) break; try{ //yes, I am aware that this can be split with regex, but that's slow and even more incomprehensible