Skip to content

Commit

Permalink
improve archetype migration
Browse files Browse the repository at this point in the history
close #298
close #297
close #293
  • Loading branch information
moo-man committed Jan 9, 2025
1 parent e6d98a7 commit be06b1e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/model/item/archetype.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export class ArchetypeModel extends BaseItemModel
structure.type = ["or", "and"].includes(structure.type) ? structure.type : "option";
if (!isNaN(structure.index))
{
structure.id = wargear[structure.index].groupId || wargear[structure.index].id;
structure.id = wargear[structure.index].groupId || wargear[structure.index].id || structure.groupId;
if (wargear[structure.index])
{
wargear[structure.index].groupId = structure.id;
}
}
else
{
Expand Down Expand Up @@ -87,6 +91,14 @@ export class ArchetypeModel extends BaseItemModel
gt : ">",
ge : ">="
}
if (i.property.includes("hasKeyword"))
{
return {
path : "keywords",
value : i.property.split("\"")[1].split("").filter(i => i != "").join(""),
operation : "includes"
}
}
return {
path : i.property,
value : i.value,
Expand Down

0 comments on commit be06b1e

Please sign in to comment.