Fixed #3644
This commit is contained in:
@@ -14,7 +14,7 @@ import mindustry.world.*;
|
||||
/** "Compiles" a sequence of statements into instructions. */
|
||||
public class LAssembler{
|
||||
public static ObjectMap<String, Func<String[], LStatement>> customParsers = new ObjectMap<>();
|
||||
public static final int maxTokenLength = 40;
|
||||
public static final int maxTokenLength = 36;
|
||||
|
||||
private int lastVar;
|
||||
/** Maps names to variable IDs. */
|
||||
|
||||
@@ -29,7 +29,11 @@ public class Bar extends Element{
|
||||
|
||||
public Bar(Prov<String> name, Prov<Color> color, Floatp fraction){
|
||||
this.fraction = fraction;
|
||||
lastValue = value = Mathf.clamp(fraction.get());
|
||||
try{
|
||||
lastValue = value = Mathf.clamp(fraction.get());
|
||||
}catch(Exception e){ //getting the fraction may involve referring to invalid data
|
||||
lastValue = value = 0f;
|
||||
}
|
||||
update(() -> {
|
||||
try{
|
||||
this.name = name.get();
|
||||
|
||||
Reference in New Issue
Block a user