Support sector-specific Truthtrance shipments
This commit is contained in:
1 parent
8006e53580
commit
536d334543
27 files changed
+1121
-71
No files matched your search
@@ -24,7 +24,10 @@ export function shipmentExpressionInputError(value: ShipmentExpression): string
|
||||
...('terms' in node && Array.isArray(node.terms) ? { terms: node.terms.map(structure) } : {}),
|
||||
};
|
||||
if ('constant' in node) return node;
|
||||
return { ...node, territory: 'arrakeen', minimum: 1 };
|
||||
// Keep the real territory for an exact sector so the shared parser checks
|
||||
// their relationship; territory-only draft editing retains its old rules.
|
||||
return { ...node, territory: Object.hasOwn(node, 'sector') && 'territory' in node
|
||||
? node.territory : 'arrakeen', minimum: 1 };
|
||||
};
|
||||
try {
|
||||
parseShipmentExpression(structure(value), { allowConstants: false });
|
||||
|
||||
Reference in new issue
Block a user