Validate sortie slot recommendations
This commit is contained in:
@@ -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}"`);
|
||||
|
||||
Reference in New Issue
Block a user