mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 19:09:34 +07:00
More instruction limits
This commit is contained in:
parent
af6ed6ea89
commit
e1f0564d0b
@ -8,6 +8,7 @@ import mindustry.gen.*;
|
|||||||
import mindustry.logic.LExecutor.*;
|
import mindustry.logic.LExecutor.*;
|
||||||
import mindustry.logic.LStatements.*;
|
import mindustry.logic.LStatements.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
import mindustry.world.blocks.logic.*;
|
||||||
|
|
||||||
/** "Compiles" a sequence of statements into instructions. */
|
/** "Compiles" a sequence of statements into instructions. */
|
||||||
public class LAssembler{
|
public class LAssembler{
|
||||||
@ -65,7 +66,7 @@ public class LAssembler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Seq<LStatement> read(String data){
|
public static Seq<LStatement> read(String data){
|
||||||
return read(data, Integer.MAX_VALUE);
|
return read(data, LogicBlock.maxInstructions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Seq<LStatement> read(String data, int max){
|
public static Seq<LStatement> read(String data, int max){
|
||||||
@ -79,7 +80,7 @@ public class LAssembler{
|
|||||||
//comments
|
//comments
|
||||||
if(line.startsWith("#")) continue;
|
if(line.startsWith("#")) continue;
|
||||||
|
|
||||||
if(index++ > max) continue;
|
if(index++ > max) break;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
//yes, I am aware that this can be split with regex, but that's slow and even more incomprehensible
|
//yes, I am aware that this can be split with regex, but that's slow and even more incomprehensible
|
||||||
|
Loading…
Reference in New Issue
Block a user