Misc
This commit is contained in:
@@ -507,19 +507,23 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
||||
}
|
||||
|
||||
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);
|
||||
if(rotation == 3) return world.tile(x, y - 1);
|
||||
return null;
|
||||
return switch(rotation){
|
||||
case 0 -> world.tile(x + 1, y);
|
||||
case 1 -> world.tile(x, y + 1);
|
||||
case 2 -> world.tile(x - 1, y);
|
||||
case 3 -> world.tile(x, y - 1);
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
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);
|
||||
if(rotation == 3) return world.build(x, y - 1);
|
||||
return null;
|
||||
return switch(rotation){
|
||||
case 0 -> world.build(x + 1, y);
|
||||
case 1 -> world.build(x, y + 1);
|
||||
case 2 -> world.build(x - 1, y);
|
||||
case 3 -> world.build(x, y - 1);
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
public boolean interactable(Team team){
|
||||
|
||||
Reference in New Issue
Block a user