Clamp sector description in info

This commit is contained in:
Anuken
2021-09-11 12:15:34 -04:00
parent 90c2473448
commit 5cf47f4198
2 changed files with 5 additions and 5 deletions

View File

@@ -750,7 +750,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
c.defaults().padBottom(5);
if(sector.preset != null && sector.preset.description != null){
c.add(sector.preset.displayDescription()).left().row();
c.add(sector.preset.displayDescription()).width(420f).wrap().left().row();
}
c.add(Core.bundle.get("sectors.time") + " [accent]" + sector.save.getPlayTime()).left().row();

View File

@@ -470,15 +470,15 @@ public class Tile implements Position, QuadTreeObject, Displayable{
getHitbox(rect);
}
public Tile nearby(Point2 relative){
public @Nullable Tile nearby(Point2 relative){
return world.tile(x + relative.x, y + relative.y);
}
public Tile nearby(int dx, int dy){
public @Nullable Tile nearby(int dx, int dy){
return world.tile(x + dx, y + dy);
}
public Tile nearby(int rotation){
public @Nullable Tile nearby(int rotation){
if(rotation == 0) return world.tile(x + 1, y);
if(rotation == 1) return world.tile(x, y + 1);
if(rotation == 2) return world.tile(x - 1, y);
@@ -486,7 +486,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
return null;
}
public Building nearbyBuild(int rotation){
public @Nullable Building nearbyBuild(int rotation){
if(rotation == 0) return world.build(x + 1, y);
if(rotation == 1) return world.build(x, y + 1);
if(rotation == 2) return world.build(x - 1, y);