mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
More cleanup
This commit is contained in:
@ -14,7 +14,6 @@ public class LogicFilter extends GenerateFilter{
|
|||||||
public static int maxInstructionsExecution = 500 * 500 * 25;
|
public static int maxInstructionsExecution = 500 * 500 * 25;
|
||||||
public String code;
|
public String code;
|
||||||
public boolean loop;
|
public boolean loop;
|
||||||
LExecutor executor;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FilterOption[] options(){
|
public FilterOption[] options(){
|
||||||
@ -39,7 +38,7 @@ public class LogicFilter extends GenerateFilter{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void apply(Tiles tiles, GenerateInput in){
|
public void apply(Tiles tiles, GenerateInput in){
|
||||||
executor = new LExecutor();
|
LExecutor executor = new LExecutor();
|
||||||
executor.privileged = true;
|
executor.privileged = true;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
@ -54,8 +53,7 @@ public class LogicFilter extends GenerateFilter{
|
|||||||
logicVars.update();
|
logicVars.update();
|
||||||
|
|
||||||
//NOTE: all tile operations will call setNet for tiles, but that should have no overhead during world loading
|
//NOTE: all tile operations will call setNet for tiles, but that should have no overhead during world loading
|
||||||
|
//executions are limited to prevent infinite generation
|
||||||
//limited run
|
|
||||||
for(int i = 1; i < maxInstructionsExecution; i++){
|
for(int i = 1; i < maxInstructionsExecution; i++){
|
||||||
if(!loop && (executor.counter.numval >= executor.instructions.length || executor.counter.numval < 0)) break;
|
if(!loop && (executor.counter.numval >= executor.instructions.length || executor.counter.numval < 0)) break;
|
||||||
executor.runOnce();
|
executor.runOnce();
|
||||||
|
Reference in New Issue
Block a user