Method cleanup
This commit is contained in:
@@ -2,8 +2,13 @@ package mindustry.game;
|
||||
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.game.Teams.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class Team implements Comparable<Team>{
|
||||
public final byte id;
|
||||
@@ -54,6 +59,30 @@ public class Team implements Comparable<Team>{
|
||||
all[us] = this;
|
||||
}
|
||||
|
||||
public Array<Team> enemies(){
|
||||
return state.teams.enemiesOf(this);
|
||||
}
|
||||
|
||||
public TeamData data(){
|
||||
return state.teams.get(this);
|
||||
}
|
||||
|
||||
public CoreEntity core(){
|
||||
return data().core();
|
||||
}
|
||||
|
||||
public boolean active(){
|
||||
return state.teams.isActive(this);
|
||||
}
|
||||
|
||||
public boolean isEnemy(Team other){
|
||||
return state.teams.areEnemies(this, other);
|
||||
}
|
||||
|
||||
public Array<CoreEntity> cores(){
|
||||
return state.teams.cores(this);
|
||||
}
|
||||
|
||||
public String localized(){
|
||||
return Core.bundle.get("team." + name + ".name", name);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public class Teams{
|
||||
return cores.isEmpty();
|
||||
}
|
||||
|
||||
public TileEntity core(){
|
||||
public CoreEntity core(){
|
||||
return cores.first();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ public class Tutorial{
|
||||
}
|
||||
|
||||
static int item(Item item){
|
||||
return state.teams.get(state.rules.defaultTeam).noCores() ? 0 : state.teams.playerCores().first().items.get(item);
|
||||
return state.rules.defaultTeam.data().noCores() ? 0 : state.rules.defaultTeam.core().items.get(item);
|
||||
}
|
||||
|
||||
static boolean toggled(String name){
|
||||
|
||||
Reference in New Issue
Block a user