Misc cleanup

This commit is contained in:
Anuken
2021-03-16 21:51:12 -04:00
parent 89997ad8d4
commit 786d638ad0
5 changed files with 6 additions and 15 deletions
+1 -2
View File
@@ -32,7 +32,6 @@ public class BaseAI{
private static final Seq<Tile> tmpTiles = new Seq<>(); private static final Seq<Tile> tmpTiles = new Seq<>();
private static int correct = 0, incorrect = 0; private static int correct = 0, incorrect = 0;
private static boolean anyDrills;
private int lastX, lastY, lastW, lastH; private int lastX, lastY, lastW, lastH;
private boolean triedWalls, foundPath; private boolean triedWalls, foundPath;
@@ -228,7 +227,7 @@ public class BaseAI{
//make sure at least X% of resource requirements are met //make sure at least X% of resource requirements are met
correct = incorrect = 0; correct = incorrect = 0;
anyDrills = false; boolean anyDrills = false;
if(part.required instanceof Item){ if(part.required instanceof Item){
for(Stile tile : result.tiles){ for(Stile tile : result.tiles){
+1 -5
View File
@@ -10,12 +10,8 @@ import mindustry.logic.LExecutor.*;
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 = 36; public static final int maxTokenLength = 36;
private static final int invalidNum = Integer.MIN_VALUE;
private static final StringMap opNameChanges = StringMap.of( private static final int invalidNum = Integer.MIN_VALUE;
"atan2", "angle",
"dst", "len"
);
private int lastVar; private int lastVar;
/** Maps names to variable IDs. */ /** Maps names to variable IDs. */
+1 -1
View File
@@ -51,7 +51,7 @@ public abstract class LStatement{
} }
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){
table.add(desc).padLeft(10).left().self(this::param);; table.add(desc).padLeft(10).left().self(this::param);
return field(table, value, setter).width(85f).padRight(10).left(); return field(table, value, setter).width(85f).padRight(10).left();
} }
+3 -3
View File
@@ -905,7 +905,7 @@ public class LStatements{
void rebuild(Table table){ void rebuild(Table table){
table.clearChildren(); table.clearChildren();
table.add(" find ").left().self(this::param);; table.add(" find ").left().self(this::param);
table.button(b -> { table.button(b -> {
b.label(() -> locate.name()); b.label(() -> locate.name());
@@ -918,14 +918,14 @@ public class LStatements{
switch(locate){ switch(locate){
case building -> { case building -> {
row(table); row(table);
table.add(" group ").left().self(this::param);; table.add(" group ").left().self(this::param);
table.button(b -> { table.button(b -> {
b.label(() -> flag.name()); b.label(() -> flag.name());
b.clicked(() -> showSelect(b, BlockFlag.allLogic, flag, t -> flag = t, 2, cell -> cell.size(110, 50))); b.clicked(() -> showSelect(b, BlockFlag.allLogic, flag, t -> flag = t, 2, cell -> cell.size(110, 50)));
}, Styles.logict, () -> {}).size(110, 40).color(table.color).left().padLeft(2); }, Styles.logict, () -> {}).size(110, 40).color(table.color).left().padLeft(2);
row(table); row(table);
table.add(" enemy ").left().self(this::param);; table.add(" enemy ").left().self(this::param);
fields(table, enemy, str -> enemy = str); fields(table, enemy, str -> enemy = str);
@@ -115,10 +115,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
tile.floor = getBlock(position); tile.floor = getBlock(position);
tile.block = tile.floor.asFloor().wall; tile.block = tile.floor.asFloor().wall;
//if(noise.octaveNoise3D(5, 0.6, 8.0, position.x, position.y, position.z) > 0.65){
//tile.block = Blocks.air;
//}
if(rid.getValue(position.x, position.y, position.z, 22) > 0.32){ if(rid.getValue(position.x, position.y, position.z, 22) > 0.32){
tile.block = Blocks.air; tile.block = Blocks.air;
} }