From a07d1f2c00772f2fa69a924e24c3d5d97006bc16 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 25 Apr 2024 10:36:41 -0400 Subject: [PATCH] More cleanup --- core/src/mindustry/maps/filters/LogicFilter.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/maps/filters/LogicFilter.java b/core/src/mindustry/maps/filters/LogicFilter.java index 6b53bb1636..1346d1a52e 100644 --- a/core/src/mindustry/maps/filters/LogicFilter.java +++ b/core/src/mindustry/maps/filters/LogicFilter.java @@ -14,7 +14,6 @@ public class LogicFilter extends GenerateFilter{ public static int maxInstructionsExecution = 500 * 500 * 25; public String code; public boolean loop; - LExecutor executor; @Override public FilterOption[] options(){ @@ -39,7 +38,7 @@ public class LogicFilter extends GenerateFilter{ @Override public void apply(Tiles tiles, GenerateInput in){ - executor = new LExecutor(); + LExecutor executor = new LExecutor(); executor.privileged = true; try{ @@ -54,8 +53,7 @@ public class LogicFilter extends GenerateFilter{ logicVars.update(); //NOTE: all tile operations will call setNet for tiles, but that should have no overhead during world loading - - //limited run + //executions are limited to prevent infinite generation for(int i = 1; i < maxInstructionsExecution; i++){ if(!loop && (executor.counter.numval >= executor.instructions.length || executor.counter.numval < 0)) break; executor.runOnce();