Sector icons rescaled / Anti-air turrets no longer trigger place range check

This commit is contained in:
Anuken
2025-04-09 21:16:19 -04:00
parent 061989bada
commit 80fbf59188
31 changed files with 8 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ public class BaseTurret extends Block{
public float placeOverlapMargin = 8 * 7f;
public float rotateSpeed = 5;
public float fogRadiusMultiplier = 1f;
public boolean disableOverlapCheck = false;
/** Effect displayed when coolant is used. */
public Effect coolEffect = Fx.fuelburn;
@@ -57,7 +58,9 @@ public class BaseTurret extends Block{
if(!hasConsumer(coolant)) consume(coolant);
}
placeOverlapRange = Math.max(placeOverlapRange, range + placeOverlapMargin);
if(!disableOverlapCheck){
placeOverlapRange = Math.max(placeOverlapRange, range + placeOverlapMargin);
}
fogRadius = Math.max(Mathf.round(range / tilesize * fogRadiusMultiplier), fogRadius);
super.init();
}

View File

@@ -196,6 +196,10 @@ public class Turret extends ReloadTurret{
if(cooldownTime < 0f) cooldownTime = reload;
if(newTargetInterval <= 0f) newTargetInterval = targetInterval;
if(!targetGround){
disableOverlapCheck = true;
}
super.init();
trackingRange = Math.max(range, trackingRange);
}