This commit is contained in:
Anuken
2022-06-08 09:05:25 -04:00
parent b9297a83b0
commit b2353eba58
2 changed files with 14 additions and 12 deletions

View File

@@ -2019,7 +2019,6 @@ block.shield-breaker.name = Shield Breaker (temp name/sprite)
block.tank-fabricator.name = Tank Fabricator block.tank-fabricator.name = Tank Fabricator
block.mech-fabricator.name = Mech Fabricator block.mech-fabricator.name = Mech Fabricator
block.ship-fabricator.name = Ship Fabricator block.ship-fabricator.name = Ship Fabricator
block.refabricator.name = Refabricator
block.prime-refabricator.name = Prime Refabricator block.prime-refabricator.name = Prime Refabricator
block.unit-repair-tower.name = Unit Repair Tower block.unit-repair-tower.name = Unit Repair Tower
block.diffuse.name = Diffuse block.diffuse.name = Diffuse
@@ -2040,7 +2039,6 @@ unit.incite.name = Incite
unit.emanate.name = Emanate unit.emanate.name = Emanate
unit.manifold.name = Manifold unit.manifold.name = Manifold
unit.assembly-drone.name = Assembly Drone unit.assembly-drone.name = Assembly Drone
unit.effect-drone.name = Effect Drone
unit.precept.name = Precept unit.precept.name = Precept
unit.merui.name = Merui unit.merui.name = Merui
unit.anthicus.name = Anthicus unit.anthicus.name = Anthicus

View File

@@ -507,19 +507,23 @@ public class Tile implements Position, QuadTreeObject, Displayable{
} }
public @Nullable Tile nearby(int rotation){ public @Nullable Tile nearby(int rotation){
if(rotation == 0) return world.tile(x + 1, y); return switch(rotation){
if(rotation == 1) return world.tile(x, y + 1); case 0 -> world.tile(x + 1, y);
if(rotation == 2) return world.tile(x - 1, y); case 1 -> world.tile(x, y + 1);
if(rotation == 3) return world.tile(x, y - 1); case 2 -> world.tile(x - 1, y);
return null; case 3 -> world.tile(x, y - 1);
default -> null;
};
} }
public @Nullable Building nearbyBuild(int rotation){ public @Nullable Building nearbyBuild(int rotation){
if(rotation == 0) return world.build(x + 1, y); return switch(rotation){
if(rotation == 1) return world.build(x, y + 1); case 0 -> world.build(x + 1, y);
if(rotation == 2) return world.build(x - 1, y); case 1 -> world.build(x, y + 1);
if(rotation == 3) return world.build(x, y - 1); case 2 -> world.build(x - 1, y);
return null; case 3 -> world.build(x, y - 1);
default -> null;
};
} }
public boolean interactable(Team team){ public boolean interactable(Team team){