These things exist now
This commit is contained in:
@@ -280,11 +280,13 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Building nearby(int rotation){
|
public Building nearby(int rotation){
|
||||||
if(rotation == 0) return world.build(tile.x + 1, tile.y);
|
return switch(rotation){
|
||||||
if(rotation == 1) return world.build(tile.x, tile.y + 1);
|
case 0 -> world.build(tile.x + 1, tile.y);
|
||||||
if(rotation == 2) return world.build(tile.x - 1, tile.y);
|
case 1 -> world.build(tile.x, tile.y + 1);
|
||||||
if(rotation == 3) return world.build(tile.x, tile.y - 1);
|
case 2 -> world.build(tile.x - 1, tile.y);
|
||||||
return null;
|
case 3 -> world.build(tile.x, tile.y - 1);
|
||||||
|
default -> null;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte relativeTo(Tile tile){
|
public byte relativeTo(Tile tile){
|
||||||
|
|||||||
Reference in New Issue
Block a user