Nestable set iteration
This commit is contained in:
@@ -264,11 +264,6 @@ public class Mechs implements ContentList{
|
|||||||
bullet = Bullets.standardCopper;
|
bullet = Bullets.standardCopper;
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean alwaysUnlocked(){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
javelin = new Mech("javelin-ship", true){
|
javelin = new Mech("javelin-ship", true){
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package io.anuke.mindustry.core;
|
|||||||
|
|
||||||
import io.anuke.annotations.Annotations.*;
|
import io.anuke.annotations.Annotations.*;
|
||||||
import io.anuke.arc.*;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.collection.ObjectSet.*;
|
|
||||||
import io.anuke.arc.util.*;
|
import io.anuke.arc.util.*;
|
||||||
import io.anuke.mindustry.content.*;
|
import io.anuke.mindustry.content.*;
|
||||||
import io.anuke.mindustry.core.GameState.*;
|
import io.anuke.mindustry.core.GameState.*;
|
||||||
@@ -175,7 +174,7 @@ public class Logic implements ApplicationListener{
|
|||||||
ui.hudfrag.showLaunch();
|
ui.hudfrag.showLaunch();
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Tile tile : new ObjectSetIterator<>(state.teams.get(defaultTeam).cores)){
|
for(Tile tile : state.teams.get(defaultTeam).cores){
|
||||||
Effects.effect(Fx.launch, tile);
|
Effects.effect(Fx.launch, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +183,7 @@ public class Logic implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
Time.runTask(30f, () -> {
|
Time.runTask(30f, () -> {
|
||||||
for(Tile tile : new ObjectSetIterator<>(state.teams.get(defaultTeam).cores)){
|
for(Tile tile : state.teams.get(defaultTeam).cores){
|
||||||
for(Item item : content.items()){
|
for(Item item : content.items()){
|
||||||
if(tile == null || tile.entity == null || tile.entity.items == null) continue;
|
if(tile == null || tile.entity == null || tile.entity.items == null) continue;
|
||||||
data.addItem(item, tile.entity.items.get(item));
|
data.addItem(item, tile.entity.items.get(item));
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package io.anuke.mindustry.ui.dialogs;
|
|||||||
|
|
||||||
import io.anuke.arc.*;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.collection.*;
|
import io.anuke.arc.collection.*;
|
||||||
import io.anuke.arc.collection.ObjectSet.*;
|
|
||||||
import io.anuke.arc.function.*;
|
import io.anuke.arc.function.*;
|
||||||
import io.anuke.arc.graphics.*;
|
import io.anuke.arc.graphics.*;
|
||||||
import io.anuke.arc.graphics.g2d.*;
|
import io.anuke.arc.graphics.g2d.*;
|
||||||
@@ -153,7 +152,7 @@ public class DeployDialog extends FloatingDialog{
|
|||||||
for(ZoneNode node : nodes){
|
for(ZoneNode node : nodes){
|
||||||
node.allChildren.clear();
|
node.allChildren.clear();
|
||||||
node.allChildren.addAll(node.children);
|
node.allChildren.addAll(node.children);
|
||||||
for(ZoneNode other : new ObjectSetIterator<>(nodes)){
|
for(ZoneNode other : nodes){
|
||||||
if(other.zone.requirements.contains(req -> req.zone() == node.zone)){
|
if(other.zone.requirements.contains(req -> req.zone() == node.zone)){
|
||||||
node.allChildren.add(other);
|
node.allChildren.add(other);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package io.anuke.mindustry.world.blocks.storage;
|
|||||||
import io.anuke.annotations.Annotations.*;
|
import io.anuke.annotations.Annotations.*;
|
||||||
import io.anuke.arc.*;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.collection.*;
|
import io.anuke.arc.collection.*;
|
||||||
import io.anuke.arc.collection.ObjectSet.*;
|
|
||||||
import io.anuke.arc.function.*;
|
import io.anuke.arc.function.*;
|
||||||
import io.anuke.arc.graphics.g2d.*;
|
import io.anuke.arc.graphics.g2d.*;
|
||||||
import io.anuke.arc.math.*;
|
import io.anuke.arc.math.*;
|
||||||
@@ -157,7 +156,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
tile.entity.items.set(item, Math.min(tile.entity.items.get(item), max));
|
tile.entity.items.set(item, Math.min(tile.entity.items.get(item), max));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Tile other : new ObjectSetIterator<>(state.teams.get(tile.getTeam()).cores)){
|
for(Tile other : state.teams.get(tile.getTeam()).cores){
|
||||||
other.block().onProximityUpdate(other);
|
other.block().onProximityUpdate(other);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=80e74b71aefc288d02c0098ccd57de810107367c
|
archash=9ed2c7bd64741309e2ece3fdc15f169862922ef3
|
||||||
|
|||||||
Reference in New Issue
Block a user