Skip to content
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

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

stwlam
Copy link
Collaborator

@stwlam stwlam commented Oct 31, 2023

No description provided.

@stwlam stwlam marked this pull request as draft October 31, 2023 20:18
@stwlam stwlam force-pushed the simplify-spell-data branch 3 times, most recently from c19ad38 to 42bd44d Compare November 6, 2023 07:52
@stwlam stwlam changed the title Simply several areas of spell data Prune and simply several areas of spell data Nov 6, 2023
@stwlam stwlam force-pushed the simplify-spell-data branch 3 times, most recently from a61af6b to 432ee3d Compare November 6, 2023 08:10
@stwlam stwlam added the remaster Changes related to the Pathfinder Remaster label Nov 6, 2023
@CarlosFdez CarlosFdez changed the title Prune and simply several areas of spell data Prune and simplify several areas of spell data Nov 7, 2023
@stwlam stwlam force-pushed the simplify-spell-data branch 4 times, most recently from 5655c2f to 03acf22 Compare November 7, 2023 09:42
@stwlam stwlam force-pushed the simplify-spell-data branch 9 times, most recently from c76bcee to 494207b Compare November 9, 2023 22:10
@stwlam stwlam changed the title Prune and simplify several areas of spell data Prune and reorganize several areas of spell data Nov 9, 2023
@stwlam stwlam marked this pull request as ready for review November 9, 2023 22:12
if ("traditions" in system) system["-=traditions"] = null;

// Add focus trait if a focus spell
if (system.category?.value === "focus") {
Copy link
Collaborator

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");
Copy link
Collaborator

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;
Copy link
Collaborator

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",
Copy link
Collaborator

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.

@CarlosFdez CarlosFdez merged commit 82182d2 into foundryvtt:master Nov 10, 2023
1 check passed
@CarlosFdez
Copy link
Collaborator

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).

@stwlam stwlam deleted the simplify-spell-data branch November 10, 2023 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: data migration remaster Changes related to the Pathfinder Remaster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants