Seq.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package mindustry.editor;
|
||||
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import arc.struct.LongArray;
|
||||
import arc.struct.LongSeq;
|
||||
import mindustry.game.Team;
|
||||
import mindustry.gen.TileOp;
|
||||
import mindustry.world.Block;
|
||||
@@ -12,7 +12,7 @@ import static mindustry.Vars.content;
|
||||
|
||||
public class DrawOperation{
|
||||
private MapEditor editor;
|
||||
private LongArray array = new LongArray();
|
||||
private LongSeq array = new LongSeq();
|
||||
|
||||
public DrawOperation(MapEditor editor) {
|
||||
this.editor = editor;
|
||||
|
||||
@@ -91,7 +91,7 @@ public enum EditorTool{
|
||||
edit = true;
|
||||
}
|
||||
|
||||
IntArray stack = new IntArray();
|
||||
IntSeq stack = new IntSeq();
|
||||
|
||||
@Override
|
||||
public void touched(MapEditor editor, int x, int y){
|
||||
@@ -200,7 +200,7 @@ public enum EditorTool{
|
||||
stack = null;
|
||||
System.gc();
|
||||
e.printStackTrace();
|
||||
stack = new IntArray();
|
||||
stack = new IntSeq();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
private Rules lastSavedRules;
|
||||
private boolean saved = false;
|
||||
private boolean shownWithMap = false;
|
||||
private Array<Block> blocksOut = new Array<>();
|
||||
private Seq<Block> blocksOut = new Seq<>();
|
||||
|
||||
public MapEditorDialog(){
|
||||
super("");
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
private Pixmap pixmap;
|
||||
private Texture texture;
|
||||
private GenerateInput input = new GenerateInput();
|
||||
private Array<GenerateFilter> filters = new Array<>();
|
||||
private Seq<GenerateFilter> filters = new Seq<>();
|
||||
private int scaling = mobile ? 3 : 1;
|
||||
private Table filterTable;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
private GenTile returnTile = new GenTile();
|
||||
|
||||
private GenTile[][] buffer1, buffer2;
|
||||
private Cons<Array<GenerateFilter>> applier;
|
||||
private Cons<Seq<GenerateFilter>> applier;
|
||||
private CachedTile ctile = new CachedTile(){
|
||||
//nothing.
|
||||
@Override
|
||||
@@ -95,18 +95,18 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
onResize(this::rebuildFilters);
|
||||
}
|
||||
|
||||
public void show(Array<GenerateFilter> filters, Cons<Array<GenerateFilter>> applier){
|
||||
public void show(Seq<GenerateFilter> filters, Cons<Seq<GenerateFilter>> applier){
|
||||
this.filters = filters;
|
||||
this.applier = applier;
|
||||
show();
|
||||
}
|
||||
|
||||
public void show(Cons<Array<GenerateFilter>> applier){
|
||||
public void show(Cons<Seq<GenerateFilter>> applier){
|
||||
show(this.filters, applier);
|
||||
}
|
||||
|
||||
/** Applies the specified filters to the editor. */
|
||||
public void applyToEditor(Array<GenerateFilter> filters){
|
||||
public void applyToEditor(Seq<GenerateFilter> filters){
|
||||
//writeback buffer
|
||||
GenTile[][] writeTiles = new GenTile[editor.width()][editor.height()];
|
||||
|
||||
@@ -342,7 +342,7 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
return;
|
||||
}
|
||||
|
||||
Array<GenerateFilter> copy = new Array<>(filters);
|
||||
Seq<GenerateFilter> copy = new Seq<>(filters);
|
||||
|
||||
result = executor.submit(() -> {
|
||||
try{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package mindustry.editor;
|
||||
|
||||
import arc.struct.Array;
|
||||
import arc.struct.Seq;
|
||||
|
||||
public class OperationStack{
|
||||
private final static int maxSize = 10;
|
||||
private Array<DrawOperation> stack = new Array<>();
|
||||
private Seq<DrawOperation> stack = new Seq<>();
|
||||
private int index = 0;
|
||||
|
||||
public OperationStack(){
|
||||
|
||||
@@ -26,7 +26,7 @@ import static mindustry.game.SpawnGroup.never;
|
||||
|
||||
public class WaveInfoDialog extends BaseDialog{
|
||||
private final static int displayed = 20;
|
||||
private Array<SpawnGroup> groups = new Array<>();
|
||||
private Seq<SpawnGroup> groups = new Seq<>();
|
||||
|
||||
private Table table, preview;
|
||||
private int start = 0;
|
||||
@@ -87,7 +87,7 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
main.pane(t -> table = t).growX().growY().padRight(8f).get().setScrollingDisabled(true, false);
|
||||
main.row();
|
||||
main.button("$add", () -> {
|
||||
if(groups == null) groups = new Array<>();
|
||||
if(groups == null) groups = new Seq<>();
|
||||
groups.add(new SpawnGroup(lastType));
|
||||
buildGroups();
|
||||
}).growX().height(70f);
|
||||
|
||||
Reference in New Issue
Block a user