Limited all logic strings/symbols to 30 characters
This commit is contained in:
@@ -14,6 +14,7 @@ import mindustry.world.*;
|
|||||||
/** "Compiles" a sequence of statements into instructions. */
|
/** "Compiles" a sequence of statements into instructions. */
|
||||||
public class LAssembler{
|
public class LAssembler{
|
||||||
public static ObjectMap<String, Func<String[], LStatement>> customParsers = new ObjectMap<>();
|
public static ObjectMap<String, Func<String[], LStatement>> customParsers = new ObjectMap<>();
|
||||||
|
public static final int maxTokenLength = 30;
|
||||||
|
|
||||||
private int lastVar;
|
private int lastVar;
|
||||||
/** Maps names to variable IDs. */
|
/** Maps names to variable IDs. */
|
||||||
@@ -122,7 +123,7 @@ public class LAssembler{
|
|||||||
if(c == '"'){
|
if(c == '"'){
|
||||||
inString = !inString;
|
inString = !inString;
|
||||||
}else if(c == ' ' && !inString){
|
}else if(c == ' ' && !inString){
|
||||||
tokens.add(line.substring(lastIdx, i));
|
tokens.add(line.substring(lastIdx, Math.min(i, lastIdx + maxTokenLength)));
|
||||||
lastIdx = i + 1;
|
lastIdx = i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public abstract class LStatement{
|
|||||||
|
|
||||||
protected Cell<TextField> field(Table table, String value, Cons<String> setter){
|
protected Cell<TextField> field(Table table, String value, Cons<String> setter){
|
||||||
return table.field(value, Styles.nodeField, setter)
|
return table.field(value, Styles.nodeField, setter)
|
||||||
.size(144f, 40f).pad(2f).color(table.color).addInputDialog();
|
.size(144f, 40f).pad(2f).color(table.color).maxTextLength(LAssembler.maxTokenLength).addInputDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Cell<TextField> fields(Table table, String desc, String value, Cons<String> setter){
|
protected Cell<TextField> fields(Table table, String desc, String value, Cons<String> setter){
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=f1feed86eb643c2e5dbcee013b1b186644b5cf98
|
archash=6ae9d64e7e84e518ae08edeccdd24cd027b45ec4
|
||||||
|
|||||||
Reference in New Issue
Block a user