Fixed erekir unit requirements
This commit is contained in:
@@ -159,6 +159,8 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
public boolean expanded = false;
|
||||
/** Clipping size of this block. Should be as large as the block will draw. */
|
||||
public float clipSize = -1f;
|
||||
/** When placeRangeCheck is enabled, this is the range checked for enemy blocks. */
|
||||
public float placeOverlapRange = 30f;
|
||||
/** Max of timers used. */
|
||||
public int timers = 0;
|
||||
/** Cache layer. Only used for 'cached' rendering. */
|
||||
|
||||
@@ -94,7 +94,7 @@ public class Build{
|
||||
|
||||
Block previous = tile.block();
|
||||
Block sub = ConstructBlock.get(result.size);
|
||||
Seq<Building> prevBuild = new Seq<>(9);
|
||||
var prevBuild = new Seq<Building>(9);
|
||||
|
||||
result.beforePlaceBegan(tile, previous);
|
||||
tmp.clear();
|
||||
@@ -201,9 +201,17 @@ public class Build{
|
||||
}
|
||||
}
|
||||
|
||||
if(state.rules.placeRangeCheck && getEnemyOverlap(type, team, x, y) != null){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static @Nullable Building getEnemyOverlap(Block block, Team team, int x, int y){
|
||||
return indexer.findEnemyTile(team, x * tilesize + block.size, y * tilesize + block.size, block.placeOverlapRange + 4f, p -> true);
|
||||
}
|
||||
|
||||
public static boolean contactsGround(int x, int y, Block block){
|
||||
if(block.isMultiblock()){
|
||||
for(Point2 point : Edges.getEdges(block.size)){
|
||||
|
||||
@@ -45,6 +45,7 @@ public class BaseTurret extends Block{
|
||||
consumes.add(coolantOverride != null ? new ConsumeLiquid(coolantOverride, coolantUsage) : new ConsumeCoolant(coolantUsage)).update(false).boost();
|
||||
}
|
||||
|
||||
placeOverlapRange = Math.max(placeOverlapRange, range);
|
||||
super.init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user