cleanup
This commit is contained in:
@@ -3,7 +3,6 @@ package mindustry.annotations.entity;
|
|||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
import arc.util.pooling.Pool.*;
|
import arc.util.pooling.Pool.*;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package mindustry.annotations.util;
|
package mindustry.annotations.util;
|
||||||
|
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
import arc.util.*;
|
||||||
import com.squareup.javapoet.*;
|
import com.squareup.javapoet.*;
|
||||||
import com.sun.tools.javac.code.Attribute.*;
|
import com.sun.tools.javac.code.Attribute.*;
|
||||||
import mindustry.annotations.*;
|
import mindustry.annotations.*;
|
||||||
@@ -19,7 +19,8 @@ public class Selement<T extends Element>{
|
|||||||
this.e = e;
|
this.e = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable String doc(){
|
@Nullable
|
||||||
|
public String doc(){
|
||||||
return BaseProcessor.elementu.getDocComment(e);
|
return BaseProcessor.elementu.getDocComment(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,18 @@ abstract class TeamComp implements Posc{
|
|||||||
return team.rules().cheat;
|
return team.rules().cheat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable
|
@Nullable
|
||||||
Building core(){
|
public Building core(){
|
||||||
return team.core();
|
return team.core();
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable Building closestCore(){
|
@Nullable
|
||||||
|
public Building closestCore(){
|
||||||
return state.teams.closestCore(x, y, team);
|
return state.teams.closestCore(x, y, team);
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable Building closestEnemyCore(){
|
@Nullable
|
||||||
|
public Building closestEnemyCore(){
|
||||||
return state.teams.closestEnemyCore(x, y, team);
|
return state.teams.closestEnemyCore(x, y, team);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ public class Team implements Comparable<Team>{
|
|||||||
return state.teams.get(this);
|
return state.teams.get(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable
|
@Nullable
|
||||||
CoreBuild core(){
|
public CoreBuild core(){
|
||||||
return data().core();
|
return data().core();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ public class Teams{
|
|||||||
active.add(get(Team.crux));
|
active.add(get(Team.crux));
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable
|
@Nullable
|
||||||
CoreBuild closestEnemyCore(float x, float y, Team team){
|
public CoreBuild closestEnemyCore(float x, float y, Team team){
|
||||||
for(Team enemy : team.enemies()){
|
for(Team enemy : team.enemies()){
|
||||||
CoreBuild tile = Geometry.findClosest(x, y, enemy.cores());
|
CoreBuild tile = Geometry.findClosest(x, y, enemy.cores());
|
||||||
if(tile != null) return tile;
|
if(tile != null) return tile;
|
||||||
@@ -33,7 +33,8 @@ public class Teams{
|
|||||||
return null;
|
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);
|
return Geometry.findClosest(x, y, get(team).cores);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +177,8 @@ public class Teams{
|
|||||||
return cores.isEmpty();
|
return cores.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable CoreBuild core(){
|
@Nullable
|
||||||
|
public CoreBuild core(){
|
||||||
return cores.isEmpty() ? null : cores.first();
|
return cores.isEmpty() ? null : cores.first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,8 +202,8 @@ public class LAssembler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable
|
@Nullable
|
||||||
BVar getVar(String name){
|
public BVar getVar(String name){
|
||||||
return vars.get(name);
|
return vars.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ public interface Publishable{
|
|||||||
/** @return default title of the listing. */
|
/** @return default title of the listing. */
|
||||||
String steamTitle();
|
String steamTitle();
|
||||||
/** @return standard steam listing description, may be null. this is editable by users after release.*/
|
/** @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'. */
|
/** @return the tag that this content has. e.g. 'schematic' or 'map'. */
|
||||||
String steamTag();
|
String steamTag();
|
||||||
/** @return a folder with everything needed for this piece of content in it; does not need to be a copy. */
|
/** @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 */
|
/** @return a tile at coordinates, or null if out of bounds */
|
||||||
public @Nullable
|
@Nullable
|
||||||
Tile get(int x, int y){
|
public Tile get(int x, int y){
|
||||||
return (x < 0 || x >= width || y < 0 || y >= height) ? null : array[y*width + x];
|
return (x < 0 || x >= width || y < 0 || y >= height) ? null : array[y*width + x];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user