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

@@ -9,7 +9,7 @@ import mindustry.world.meta.values.*;
/** Hold and organizes a list of block stats. */
public class BlockStats{
private final OrderedMap<StatCategory, OrderedMap<BlockStat, Array<StatValue>>> map = new OrderedMap<>();
private final OrderedMap<StatCategory, OrderedMap<BlockStat, Seq<StatValue>>> map = new OrderedMap<>();
private boolean dirty;
/** Adds a single float value with this stat, formatted to 2 decimal places. */
@@ -59,7 +59,7 @@ public class BlockStats{
map.put(stat.category, new OrderedMap<>());
}
map.get(stat.category).get(stat, Array::new).add(value);
map.get(stat.category).get(stat, Seq::new).add(value);
dirty = true;
}
@@ -75,11 +75,11 @@ public class BlockStats{
dirty = true;
}
public OrderedMap<StatCategory, OrderedMap<BlockStat, Array<StatValue>>> toMap(){
public OrderedMap<StatCategory, OrderedMap<BlockStat, Seq<StatValue>>> toMap(){
//sort stats by index if they've been modified
if(dirty){
map.orderedKeys().sort();
for(Entry<StatCategory, OrderedMap<BlockStat, Array<StatValue>>> entry : map.entries()){
for(Entry<StatCategory, OrderedMap<BlockStat, Seq<StatValue>>> entry : map.entries()){
entry.value.orderedKeys().sort();
}

View File

@@ -4,7 +4,7 @@ import arc.struct.*;
import mindustry.gen.*;
public class Producers{
private Array<Produce> producers = new Array<>();
private Seq<Produce> producers = new Seq<>();
public void add(Produce prod){
producers.add(prod);

View File

@@ -1,6 +1,6 @@
package mindustry.world.meta.values;
import arc.struct.Array;
import arc.struct.Seq;
import arc.func.Boolf;
import arc.scene.ui.layout.Table;
import mindustry.type.Item;
@@ -18,7 +18,7 @@ public class ItemFilterValue implements StatValue{
@Override
public void display(Table table){
Array<Item> list = content.items().select(filter);
Seq<Item> list = content.items().select(filter);
for(int i = 0; i < list.size; i++){
Item item = list.get(i);

View File

@@ -1,6 +1,6 @@
package mindustry.world.meta.values;
import arc.struct.Array;
import arc.struct.Seq;
import arc.func.Boolf;
import arc.scene.ui.layout.Table;
import mindustry.type.Liquid;
@@ -22,7 +22,7 @@ public class LiquidFilterValue implements StatValue{
@Override
public void display(Table table){
Array<Liquid> list = new Array<>();
Seq<Liquid> list = new Seq<>();
for(Liquid item : content.liquids()){
if(!item.isHidden() && filter.get(item)) list.add(item);