Skip to content

Commit

Permalink
* MS claim-gen subtree-importer supports new "counter_claim" field in…
Browse files Browse the repository at this point in the history
… the claim object/structure.
  • Loading branch information
Venryx committed May 11, 2024
1 parent 677363a commit a67b55c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ export class CG_Claim extends CG_Node {

// v3 (tool extending claim-gen)
arguments?: (string | CG_Argument)[];

// v4
counter_claim?: string;
}
export class CG_Argument extends CG_Node {
argument: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const GetResourcesInClaim_CG = CreateAccessor((context: ImportContext, cl
const args = [] as CG_Argument[];
if (claim.argument) args.push({argument: claim.argument} as CG_Argument);
if (claim.arguments) args.push(...claim.arguments.map(a=>(IsString(a) ? {argument: a} : a)) as CG_Argument[]);
if (claim.counter_claim) args.push({argument: claim.counter_claim} as CG_Argument);
for (const [i, argument] of args.entries()) {
result.push(NewNodeResource(context, argument, NodeType.claim, path_indexes.concat(i), path_titles.concat(argument.argument), claimResource, ChildGroup.freeform));
}
Expand Down

0 comments on commit a67b55c

Please sign in to comment.