Skip to content

Commit 01f2d9c

Browse files
Merge pull request #1421 from braedonsaunders/claude/fix-lint-errors-W3b5G
fix: prefix unused variables with underscore to fix lint errors
2 parents 9c3f89b + 0f1e0b6 commit 01f2d9c

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

src/engine/systems/ai/AITacticsManager.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const HUNT_MODE_STUCK_DISENGAGE_TICKS = 300; // ~15 seconds with no combat → f
5353
// Air control constants
5454
const AIR_HARASS_MAX_UNITS = 3; // Max air units for harassment
5555
const AIR_FLANK_OFFSET = 20; // How far air units flank from the main army's attack vector
56-
const AIR_REGROUP_DISTANCE = 30; // Distance from base to regroup air units
56+
const _AIR_REGROUP_DISTANCE = 30; // Distance from base to regroup air units
5757
const AIR_COMMAND_INTERVAL = 30; // Re-command air units every 30 ticks (~1.5 sec)
5858
const SUPPORT_FOLLOW_DISTANCE = 12; // Support units stay this far behind army center
5959

@@ -1766,10 +1766,7 @@ export class AITacticsManager {
17661766
* Command support air units (Lifter, Overseer) to follow the main army.
17671767
* Support units shadow the army centroid, staying slightly behind.
17681768
*/
1769-
private commandSupportAir(
1770-
ai: AIPlayer,
1771-
currentTick: number
1772-
): void {
1769+
private commandSupportAir(ai: AIPlayer, currentTick: number): void {
17731770
const supportUnits = this.getSupportAirUnits(ai.playerId);
17741771
if (supportUnits.length === 0) return;
17751772

tests/engine/systems/AIMicroSystem.test.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,10 +1601,10 @@ describe('AIMicroSystem', () => {
16011601
isDead: boolean;
16021602
}
16031603

1604-
function getSupportAirUnits(units: MockSupportUnit[], playerId: string): number[] {
1604+
function getSupportAirUnits(units: MockSupportUnit[], _playerId: string): number[] {
16051605
return units
1606-
.filter(u => !u.isDead && u.isFlying && !u.isWorker && u.attackDamage === 0)
1607-
.map(u => u.id);
1606+
.filter((u) => !u.isDead && u.isFlying && !u.isWorker && u.attackDamage === 0)
1607+
.map((u) => u.id);
16081608
}
16091609

16101610
it('should return Lifter-type units (flying, no attack)', () => {
@@ -1644,10 +1644,7 @@ describe('AIMicroSystem', () => {
16441644
state: string;
16451645
}
16461646

1647-
function getScoutUnit(
1648-
units: MockScoutUnit[],
1649-
preferredTypes: Set<string>
1650-
): number | null {
1647+
function getScoutUnit(units: MockScoutUnit[], preferredTypes: Set<string>): number | null {
16511648
// First: idle flying units
16521649
for (const u of units) {
16531650
if (u.isFlying && !u.isWorker && u.state === 'idle') return u.id;

0 commit comments

Comments
 (0)