Validate sortie slot recommendations

This commit is contained in:
2026-07-05 15:37:02 +09:00
parent e54c45cfb9
commit a8ae633ae3

View File

@@ -312,6 +312,9 @@ function validateSortie(errors, scenario, classKeys, formationRoles, terrainRule
if (slot.unitId && excludedUnitIds.has(slot.unitId)) {
errors.push(`${context}: excluded unit "${slot.unitId}" cannot have a deployment slot`);
}
if (slot.unitId && !requiredUnitIds.has(slot.unitId) && !recommendedUnitIds.has(slot.unitId)) {
errors.push(`${context}: deployment slot unit "${slot.unitId}" must be required or recommended`);
}
if (slot.unitId) {
if (deploymentUnitIds.has(slot.unitId)) {
errors.push(`${context}: duplicate deployment unit slot "${slot.unitId}"`);