This commit is contained in:
Anuken
2020-06-08 17:19:47 -04:00
parent 87ab895253
commit 8ea28e1ced
147 changed files with 438 additions and 437 deletions

View File

@@ -15,14 +15,14 @@ import mindustry.ui.Links.*;
import static mindustry.Vars.*;
public class AboutDialog extends BaseDialog{
private Array<String> contributors = new Array<>();
private Seq<String> contributors = new Seq<>();
private static ObjectSet<String> bannedItems = ObjectSet.with("google-play", "itch.io", "dev-builds", "f-droid");
public AboutDialog(){
super("$about.button");
shown(() -> {
contributors = Array.with(Core.files.internal("contributors").readString("UTF-8").split("\n"));
contributors = Seq.with(Core.files.internal("contributors").readString("UTF-8").split("\n"));
Core.app.post(this::setup);
});

View File

@@ -59,7 +59,7 @@ public class CustomRulesDialog extends BaseDialog{
t.add("$empty");
}
Array<Block> array = Array.with(rules.bannedBlocks);
Seq<Block> array = Seq.with(rules.bannedBlocks);
array.sort();
int cols = mobile && Core.graphics.isPortrait() ? 1 : mobile ? 2 : 3;

View File

@@ -34,12 +34,12 @@ public class DatabaseDialog extends BaseDialog{
table.margin(20);
ScrollPane pane = new ScrollPane(table);
Array<Content>[] allContent = Vars.content.getContentMap();
Seq<Content>[] allContent = Vars.content.getContentMap();
for(int j = 0; j < allContent.length; j++){
ContentType type = ContentType.values()[j];
Array<Content> array = allContent[j].select(c -> c instanceof UnlockableContent && !((UnlockableContent)c).isHidden());
Seq<Content> array = allContent[j].select(c -> c instanceof UnlockableContent && !((UnlockableContent)c).isHidden());
if(array.size == 0) continue;
table.add("$content." + type.name() + ".name").growX().left().color(Pal.accent);

View File

@@ -254,7 +254,7 @@ public class FileChooser extends BaseDialog{
}
public class FileHistory{
private Array<Fi> history = new Array<>();
private Seq<Fi> history = new Seq<>();
private int index;
public FileHistory(){

View File

@@ -20,7 +20,7 @@ import mindustry.ui.*;
import static mindustry.Vars.*;
public class JoinDialog extends BaseDialog{
Array<Server> servers = new Array<>();
Seq<Server> servers = new Seq<>();
Dialog add;
Server renaming;
Table local = new Table();
@@ -417,7 +417,7 @@ public class JoinDialog extends BaseDialog{
@SuppressWarnings("unchecked")
private void loadServers(){
servers = Core.settings.getJson("servers", Array.class, Array::new);
servers = Core.settings.getJson("servers", Seq.class, Seq::new);
//load imported legacy data
if(Core.settings.has("server-list")){

View File

@@ -50,7 +50,7 @@ public class LoadDialog extends BaseDialog{
Time.runTask(2f, () -> Core.scene.setScrollFocus(pane));
Array<SaveSlot> array = control.saves.getSaveSlots();
Seq<SaveSlot> array = control.saves.getSaveSlots();
array.sort((slot, other) -> -Long.compare(slot.getTimestamp(), other.getTimestamp()));
int maxwidth = Math.max((int)(Core.graphics.getWidth() / Scl.scl(470)), 1);

View File

@@ -15,8 +15,8 @@ public class LoadoutDialog extends BaseDialog{
private Runnable hider;
private Runnable resetter;
private Runnable updater;
private Array<ItemStack> stacks = new Array<>();
private Array<ItemStack> originalStacks = new Array<>();
private Seq<ItemStack> stacks = new Seq<>();
private Seq<ItemStack> originalStacks = new Seq<>();
private Table items;
private int capacity;
@@ -51,7 +51,7 @@ public class LoadoutDialog extends BaseDialog{
}).size(210f, 64f);
}
public void show(int capacity, Array<ItemStack> stacks, Runnable reseter, Runnable updater, Runnable hider){
public void show(int capacity, Seq<ItemStack> stacks, Runnable reseter, Runnable updater, Runnable hider){
this.originalStacks = stacks;
reseed();
this.resetter = reseter;

View File

@@ -332,7 +332,7 @@ public class SchematicsDialog extends BaseDialog{
cont.add(new SchematicImage(schem)).maxSize(800f);
cont.row();
Array<ItemStack> arr = schem.requirements();
Seq<ItemStack> arr = schem.requirements();
cont.table(r -> {
int i = 0;
for(ItemStack s : arr){

View File

@@ -191,7 +191,7 @@ public class TechTreeDialog extends BaseDialog{
this.parent = parent;
this.width = this.height = nodeSize;
if(node.children != null){
children = Array.with(node.children).map(t -> new LayoutNode(t, this)).toArray(LayoutNode.class);
children = Seq.with(node.children).map(t -> new LayoutNode(t, this)).toArray(LayoutNode.class);
}
}
}