cleanup
This commit is contained in:
@@ -17,16 +17,18 @@ abstract class TeamComp implements Posc{
|
||||
return team.rules().cheat;
|
||||
}
|
||||
|
||||
public @Nullable
|
||||
Building core(){
|
||||
@Nullable
|
||||
public Building core(){
|
||||
return team.core();
|
||||
}
|
||||
|
||||
public @Nullable Building closestCore(){
|
||||
@Nullable
|
||||
public Building closestCore(){
|
||||
return state.teams.closestCore(x, y, team);
|
||||
}
|
||||
|
||||
public @Nullable Building closestEnemyCore(){
|
||||
@Nullable
|
||||
public Building closestEnemyCore(){
|
||||
return state.teams.closestEnemyCore(x, y, team);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ public class Team implements Comparable<Team>{
|
||||
return state.teams.get(this);
|
||||
}
|
||||
|
||||
public @Nullable
|
||||
CoreBuild core(){
|
||||
@Nullable
|
||||
public CoreBuild core(){
|
||||
return data().core();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ public class Teams{
|
||||
active.add(get(Team.crux));
|
||||
}
|
||||
|
||||
public @Nullable
|
||||
CoreBuild closestEnemyCore(float x, float y, Team team){
|
||||
@Nullable
|
||||
public CoreBuild closestEnemyCore(float x, float y, Team team){
|
||||
for(Team enemy : team.enemies()){
|
||||
CoreBuild tile = Geometry.findClosest(x, y, enemy.cores());
|
||||
if(tile != null) return tile;
|
||||
@@ -33,7 +33,8 @@ public class Teams{
|
||||
return null;
|
||||
}
|
||||
|
||||
public @Nullable CoreBuild closestCore(float x, float y, Team team){
|
||||
@Nullable
|
||||
public CoreBuild closestCore(float x, float y, Team team){
|
||||
return Geometry.findClosest(x, y, get(team).cores);
|
||||
}
|
||||
|
||||
@@ -176,7 +177,8 @@ public class Teams{
|
||||
return cores.isEmpty();
|
||||
}
|
||||
|
||||
public @Nullable CoreBuild core(){
|
||||
@Nullable
|
||||
public CoreBuild core(){
|
||||
return cores.isEmpty() ? null : cores.first();
|
||||
}
|
||||
|
||||
|
||||
@@ -202,8 +202,8 @@ public class LAssembler{
|
||||
}
|
||||
}
|
||||
|
||||
public @Nullable
|
||||
BVar getVar(String name){
|
||||
@Nullable
|
||||
public BVar getVar(String name){
|
||||
return vars.get(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ public interface Publishable{
|
||||
/** @return default title of the listing. */
|
||||
String steamTitle();
|
||||
/** @return standard steam listing description, may be null. this is editable by users after release.*/
|
||||
@Nullable String steamDescription();
|
||||
@Nullable
|
||||
String steamDescription();
|
||||
/** @return the tag that this content has. e.g. 'schematic' or 'map'. */
|
||||
String steamTag();
|
||||
/** @return a folder with everything needed for this piece of content in it; does not need to be a copy. */
|
||||
|
||||
@@ -45,8 +45,8 @@ public class Tiles implements Iterable<Tile>{
|
||||
}
|
||||
|
||||
/** @return a tile at coordinates, or null if out of bounds */
|
||||
public @Nullable
|
||||
Tile get(int x, int y){
|
||||
@Nullable
|
||||
public Tile get(int x, int y){
|
||||
return (x < 0 || x >= width || y < 0 || y >= height) ? null : array[y*width + x];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user