-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prune and reorganize several areas of spell data #11026
Conversation
c19ad38
to
42bd44d
Compare
a61af6b
to
432ee3d
Compare
5655c2f
to
03acf22
Compare
c76bcee
to
494207b
Compare
494207b
to
0b40e73
Compare
if ("traditions" in system) system["-=traditions"] = null; | ||
|
||
// Add focus trait if a focus spell | ||
if (system.category?.value === "focus") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to check that its not a cantrip. This will convert any homebrew focus cantrip that don't have a class name into regular spells, but I don't think that's avoidable. Hopefully its a small number.
} | ||
|
||
get isCantrip(): boolean { | ||
return this.traits.has("cantrip") && !this.isRitual; | ||
} | ||
|
||
get isFocusSpell(): boolean { | ||
return this.system.category.value === "focus"; | ||
return this.traits.has("focus"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to also check for class traits and/or special focus spell traits.
} | ||
|
||
get isRitual(): boolean { | ||
return this.system.category.value === "ritual"; | ||
return !!this.system.ritual; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible in the new system for a spell to be a focus ritual? Should we relax some of the drag/drop restrictions in that case?
@@ -41,11 +29,11 @@ export class CompendiumBrowserSpellTab extends CompendiumBrowserTab { | |||
const indexFields = [ | |||
"img", | |||
"system.level.value", | |||
"system.category.value", | |||
"system.traditions.value", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that category filters are completely gone, I think the only thing you need to try to make backwards compatible here is traditions. It should be doable, but we do have compendium migrations now so I don't think its necessary anymore. You can resolve this if that's your angle.
We should probably start saving min versions for each tab so that the compendium browser shows warnings in the sources tab at some point.
Should be fine since focus cantrips have the focus trait, and that leads to us not losing any data. Easy enough to back out on that one property (or handle it a different way). |
No description provided.