Show reserve drill assignment count in roster header

This commit is contained in:
2026-07-09 13:51:20 +09:00
parent 3775f83f44
commit 5e0eb812f0

View File

@@ -14028,6 +14028,8 @@ export class CampScene extends Phaser.Scene {
const selected = this.selectedSortieUnits();
const reserveCount = Math.max(0, allies.length - selected.length);
const recentTrainingCount = this.latestReserveTrainingAwards().length;
const selectedIds = new Set(selected.map((unit) => unit.id));
const reserveTrainingAssignmentCount = allies.filter((unit) => !selectedIds.has(unit.id) && this.campaign?.reserveTrainingAssignments[unit.id]).length;
const bg = this.track(this.add.rectangle(x, y, width, 26, 0x0d141c, 0.92));
bg.setOrigin(0);
bg.setStrokeStyle(1, palette.gold, 0.38);
@@ -14036,8 +14038,12 @@ export class CampScene extends Phaser.Scene {
this.add.text(
x + width - 12,
y + 6,
recentTrainingCount > 0 ? `최근 훈련 ${recentTrainingCount} · ${this.latestReserveTrainingFocusLabel()}` : '훈련 대기',
this.textStyle(11, recentTrainingCount > 0 ? '#a8ffd0' : '#9fb0bf', true)
recentTrainingCount > 0
? `최근 훈련 ${recentTrainingCount} · ${this.latestReserveTrainingFocusLabel()}`
: reserveTrainingAssignmentCount > 0
? `개별 훈련 ${reserveTrainingAssignmentCount}`
: '훈련 대기',
this.textStyle(11, recentTrainingCount > 0 || reserveTrainingAssignmentCount > 0 ? '#a8ffd0' : '#9fb0bf', true)
)
);
trainingText.setOrigin(1, 0);