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

Use current UUID format exclusively #14975

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/module/actor/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ class ActorPF2e<TParent extends TokenDocumentPF2e | null = TokenDocumentPF2e | n
const initialized = super._initializeSource(source, options);

if (options?.pack && initialized._id) {
const uuid: CompendiumUUID = `Compendium.${options.pack}.${initialized._id}`;
const uuid = `Compendium.${options.pack}.Actor.${initialized._id}` as const;
const art = game.pf2e.system.moduleArt.map.get(uuid) ?? {};
return fu.mergeObject(initialized, art);
}
Expand Down
2 changes: 1 addition & 1 deletion src/module/apps/compendium-browser/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PackLoader {
#setModuleArt(packName: string, index: CompendiumIndex): void {
if (!packName.startsWith("pf2e.")) return;
for (const record of index) {
const uuid: CompendiumUUID = `Compendium.${packName}.${record._id}`;
const uuid = `Compendium.${packName}.Actor.${record._id}` as const;
const actorArt = game.pf2e.system.moduleArt.map.get(uuid)?.img;
record.img = actorArt ?? record.img;
}
Expand Down
16 changes: 8 additions & 8 deletions src/module/migration/migrations/720-update-spell-descriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export class Migration720UpdateSpellDescriptions extends MigrationBase {
static override version = 0.72;

private spellUUIDs: Set<CompendiumUUID> = new Set([
"Compendium.pf2e.spells-srd.GoKkejPj5yWJPIPK", // Adaptive Ablation
"Compendium.pf2e.spells-srd.1b55SgYTV65JvmQd", // Blessing of Defiance
"Compendium.pf2e.spells-srd.b515AZlB0sridKSq", // Calm Emotions
"Compendium.pf2e.spells-srd.NBSBFHxBm88qxQUy", // Chromatic Armor
"Compendium.pf2e.spells-srd.9TauMFkIsmvKJNzZ", // Elemental Absorption
"Compendium.pf2e.spells-srd.LoBjvguamA12iyW0", // Energy Absorption
"Compendium.pf2e.spells-srd.IWUe32Y5k2QFd7YQ", // Gravity Weapon
"Compendium.pf2e.spells-srd.WBmvzNDfpwka3qT4", // Light
"Compendium.pf2e.spells-srd.Item.GoKkejPj5yWJPIPK", // Adaptive Ablation
"Compendium.pf2e.spells-srd.Item.1b55SgYTV65JvmQd", // Blessing of Defiance
"Compendium.pf2e.spells-srd.Item.b515AZlB0sridKSq", // Calm Emotions
"Compendium.pf2e.spells-srd.Item.NBSBFHxBm88qxQUy", // Chromatic Armor
"Compendium.pf2e.spells-srd.Item.9TauMFkIsmvKJNzZ", // Elemental Absorption
"Compendium.pf2e.spells-srd.Item.LoBjvguamA12iyW0", // Energy Absorption
"Compendium.pf2e.spells-srd.Item.IWUe32Y5k2QFd7YQ", // Gravity Weapon
"Compendium.pf2e.spells-srd.Item.WBmvzNDfpwka3qT4", // Light
]);

private spells = UUIDUtils.fromUUIDs([...this.spellUUIDs]);
Expand Down
170 changes: 85 additions & 85 deletions src/module/migration/migrations/747-fixed-heightening.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,90 +53,90 @@ export class Migration747FixedHeightening extends MigrationBase {
}

fixedHeightenSpells = new Set<DocumentUUID>([
"Compendium.pf2e.spells-srd.0fKHBh5goe2eiFYL",
"Compendium.pf2e.spells-srd.10VcmSYNBrvBphu1",
"Compendium.pf2e.spells-srd.2gQYrCPwBmwau26O",
"Compendium.pf2e.spells-srd.2iQKhCQBijhj5Rf3",
"Compendium.pf2e.spells-srd.4koZzrnMXhhosn0D",
"Compendium.pf2e.spells-srd.5WM3WjshXgrkVCg6",
"Compendium.pf2e.spells-srd.7CUgqHunmHfW2lC5",
"Compendium.pf2e.spells-srd.7OFKYR1VY6EXDuiR",
"Compendium.pf2e.spells-srd.9s5tqqXNzcoKamWx",
"Compendium.pf2e.spells-srd.BCuHKrDeJ4eq53M6",
"Compendium.pf2e.spells-srd.CxpFy4HJHf4ACbxF",
"Compendium.pf2e.spells-srd.D2nPKbIS67m9199U",
"Compendium.pf2e.spells-srd.DCQHaLrYXMI37dvW",
"Compendium.pf2e.spells-srd.DgcSiOCR1uDXGaEA",
"Compendium.pf2e.spells-srd.EfFMLVbmkBWmzoLF",
"Compendium.pf2e.spells-srd.Et8RSCLx8w7uOLvo",
"Compendium.pf2e.spells-srd.F23T5tHPo3WsFiHW",
"Compendium.pf2e.spells-srd.FhOaQDTSnsY7tiam",
"Compendium.pf2e.spells-srd.Fr58LDSrbndgld9n",
"Compendium.pf2e.spells-srd.GaRQlC9Yw1BGKHfN",
"Compendium.pf2e.spells-srd.HGmBY8KjgLV97nUp",
"Compendium.pf2e.spells-srd.HHGUBGle4OjoxvNR",
"Compendium.pf2e.spells-srd.HTou8cG05yuSkesj",
"Compendium.pf2e.spells-srd.HWrNMQENi9WSGbnF",
"Compendium.pf2e.spells-srd.HcIAQZjNXHemoXSU",
"Compendium.pf2e.spells-srd.Ifc2b6bNVdjKV7Si",
"Compendium.pf2e.spells-srd.JHntYF0SbaWKq7wR",
"Compendium.pf2e.spells-srd.LQzlKbYjZSMFQawP",
"Compendium.pf2e.spells-srd.LiGbewa9pO0yjbsY",
"Compendium.pf2e.spells-srd.Llx0xKvtu8S4z6TI",
"Compendium.pf2e.spells-srd.Mkbq9xlAUxHUHyR2",
"Compendium.pf2e.spells-srd.OAt2ZEns1gIOCgrn",
"Compendium.pf2e.spells-srd.OhD2Z6rIGGD5ocZA",
"Compendium.pf2e.spells-srd.PRrZ7anETWPm90YY",
"Compendium.pf2e.spells-srd.PjhUmyKnq6K5uDby",
"Compendium.pf2e.spells-srd.Popa5umI3H33levx",
"Compendium.pf2e.spells-srd.Pwq6T7xpfAJXV5aj",
"Compendium.pf2e.spells-srd.Q7QQ91vQtyi1Ux36",
"Compendium.pf2e.spells-srd.Seaah9amXg70RKw2",
"Compendium.pf2e.spells-srd.U58aQWJ47VrI36yP",
"Compendium.pf2e.spells-srd.UmXhuKrYZR3W16mQ",
"Compendium.pf2e.spells-srd.VTb0yI6P1bLkzuRr",
"Compendium.pf2e.spells-srd.VlNcjmYyu95vOUe8",
"Compendium.pf2e.spells-srd.W02bHXylIpoXbO4e",
"Compendium.pf2e.spells-srd.WsUwpfmhKrKwoIe3",
"Compendium.pf2e.spells-srd.Wt94cw03L77sbud7",
"Compendium.pf2e.spells-srd.XhgMx9WC6NfXd9RP",
"Compendium.pf2e.spells-srd.ZAX0OOcKtYMQlquR",
"Compendium.pf2e.spells-srd.ZqmP9gijBmK7y8Xy",
"Compendium.pf2e.spells-srd.aIHY2DArKFweIrpf",
"Compendium.pf2e.spells-srd.atlgGNI1E1Ox3O3a",
"Compendium.pf2e.spells-srd.bay4AfSu2iIozNNW",
"Compendium.pf2e.spells-srd.czO0wbT1i320gcu9",
"Compendium.pf2e.spells-srd.dINQzhqGmIsqGMUY",
"Compendium.pf2e.spells-srd.drmvQJETA3WZzXyw",
"Compendium.pf2e.spells-srd.e36Z2t6tLdW3RUzZ",
"Compendium.pf2e.spells-srd.fprqWKUc0jnMIyGU",
"Compendium.pf2e.spells-srd.gISYsBFby1TiXfBt",
"Compendium.pf2e.spells-srd.ivKnEtI1z4UqEKIA",
"Compendium.pf2e.spells-srd.kuoYff1csM5eAcAP",
"Compendium.pf2e.spells-srd.lbrWMnS2pecKaSVB",
"Compendium.pf2e.spells-srd.lsR3RLEdBG4rcSzd",
"Compendium.pf2e.spells-srd.nXmC2Xx9WmS5NsAo",
"Compendium.pf2e.spells-srd.o6YCGx4lycsYpww4",
"Compendium.pf2e.spells-srd.pZTqGY1MLRjgKasV",
"Compendium.pf2e.spells-srd.pt3gEnzA159uHcJC",
"Compendium.pf2e.spells-srd.pwzdSlJgYqN7bs2w",
"Compendium.pf2e.spells-srd.q5qmNn144ZJGxnvJ",
"Compendium.pf2e.spells-srd.qTr2oCgIXl703Whb",
"Compendium.pf2e.spells-srd.qwlh6aDgi86U3Q7H",
"Compendium.pf2e.spells-srd.r4HLQcYwB62bTayl",
"Compendium.pf2e.spells-srd.sFwoKj0TsacsmoWj",
"Compendium.pf2e.spells-srd.vLA0q0WOK2YPuJs6",
"Compendium.pf2e.spells-srd.vLzFcIaSXs7YTIqJ",
"Compendium.pf2e.spells-srd.vTQvfYu2llKQedmY",
"Compendium.pf2e.spells-srd.vctIUOOgSmxAF0KG",
"Compendium.pf2e.spells-srd.wzctak6BxOW8xvFV",
"Compendium.pf2e.spells-srd.x5rGOmhDRDVQPrnW",
"Compendium.pf2e.spells-srd.x7SPrsRxGb2Vy2nu",
"Compendium.pf2e.spells-srd.x9RIFhquazom4p02",
"Compendium.pf2e.spells-srd.xRgU9rrhmGAgG4Rc",
"Compendium.pf2e.spells-srd.yH13KXUK2x093NUv",
"Compendium.pf2e.spells-srd.yM3KTTSAIHhyuP14",
"Compendium.pf2e.spells-srd.zlnXpME1T2uvn8Lr",
"Compendium.pf2e.spells-srd.zul5cBTfr7NXHBZf",
"Compendium.pf2e.spells-srd.Item.0fKHBh5goe2eiFYL",
"Compendium.pf2e.spells-srd.Item.10VcmSYNBrvBphu1",
"Compendium.pf2e.spells-srd.Item.2gQYrCPwBmwau26O",
"Compendium.pf2e.spells-srd.Item.2iQKhCQBijhj5Rf3",
"Compendium.pf2e.spells-srd.Item.4koZzrnMXhhosn0D",
"Compendium.pf2e.spells-srd.Item.5WM3WjshXgrkVCg6",
"Compendium.pf2e.spells-srd.Item.7CUgqHunmHfW2lC5",
"Compendium.pf2e.spells-srd.Item.7OFKYR1VY6EXDuiR",
"Compendium.pf2e.spells-srd.Item.9s5tqqXNzcoKamWx",
"Compendium.pf2e.spells-srd.Item.BCuHKrDeJ4eq53M6",
"Compendium.pf2e.spells-srd.Item.CxpFy4HJHf4ACbxF",
"Compendium.pf2e.spells-srd.Item.D2nPKbIS67m9199U",
"Compendium.pf2e.spells-srd.Item.DCQHaLrYXMI37dvW",
"Compendium.pf2e.spells-srd.Item.DgcSiOCR1uDXGaEA",
"Compendium.pf2e.spells-srd.Item.EfFMLVbmkBWmzoLF",
"Compendium.pf2e.spells-srd.Item.Et8RSCLx8w7uOLvo",
"Compendium.pf2e.spells-srd.Item.F23T5tHPo3WsFiHW",
"Compendium.pf2e.spells-srd.Item.FhOaQDTSnsY7tiam",
"Compendium.pf2e.spells-srd.Item.Fr58LDSrbndgld9n",
"Compendium.pf2e.spells-srd.Item.GaRQlC9Yw1BGKHfN",
"Compendium.pf2e.spells-srd.Item.HGmBY8KjgLV97nUp",
"Compendium.pf2e.spells-srd.Item.HHGUBGle4OjoxvNR",
"Compendium.pf2e.spells-srd.Item.HTou8cG05yuSkesj",
"Compendium.pf2e.spells-srd.Item.HWrNMQENi9WSGbnF",
"Compendium.pf2e.spells-srd.Item.HcIAQZjNXHemoXSU",
"Compendium.pf2e.spells-srd.Item.Ifc2b6bNVdjKV7Si",
"Compendium.pf2e.spells-srd.Item.JHntYF0SbaWKq7wR",
"Compendium.pf2e.spells-srd.Item.LQzlKbYjZSMFQawP",
"Compendium.pf2e.spells-srd.Item.LiGbewa9pO0yjbsY",
"Compendium.pf2e.spells-srd.Item.Llx0xKvtu8S4z6TI",
"Compendium.pf2e.spells-srd.Item.Mkbq9xlAUxHUHyR2",
"Compendium.pf2e.spells-srd.Item.OAt2ZEns1gIOCgrn",
"Compendium.pf2e.spells-srd.Item.OhD2Z6rIGGD5ocZA",
"Compendium.pf2e.spells-srd.Item.PRrZ7anETWPm90YY",
"Compendium.pf2e.spells-srd.Item.PjhUmyKnq6K5uDby",
"Compendium.pf2e.spells-srd.Item.Popa5umI3H33levx",
"Compendium.pf2e.spells-srd.Item.Pwq6T7xpfAJXV5aj",
"Compendium.pf2e.spells-srd.Item.Q7QQ91vQtyi1Ux36",
"Compendium.pf2e.spells-srd.Item.Seaah9amXg70RKw2",
"Compendium.pf2e.spells-srd.Item.U58aQWJ47VrI36yP",
"Compendium.pf2e.spells-srd.Item.UmXhuKrYZR3W16mQ",
"Compendium.pf2e.spells-srd.Item.VTb0yI6P1bLkzuRr",
"Compendium.pf2e.spells-srd.Item.VlNcjmYyu95vOUe8",
"Compendium.pf2e.spells-srd.Item.W02bHXylIpoXbO4e",
"Compendium.pf2e.spells-srd.Item.WsUwpfmhKrKwoIe3",
"Compendium.pf2e.spells-srd.Item.Wt94cw03L77sbud7",
"Compendium.pf2e.spells-srd.Item.XhgMx9WC6NfXd9RP",
"Compendium.pf2e.spells-srd.Item.ZAX0OOcKtYMQlquR",
"Compendium.pf2e.spells-srd.Item.ZqmP9gijBmK7y8Xy",
"Compendium.pf2e.spells-srd.Item.aIHY2DArKFweIrpf",
"Compendium.pf2e.spells-srd.Item.atlgGNI1E1Ox3O3a",
"Compendium.pf2e.spells-srd.Item.bay4AfSu2iIozNNW",
"Compendium.pf2e.spells-srd.Item.czO0wbT1i320gcu9",
"Compendium.pf2e.spells-srd.Item.dINQzhqGmIsqGMUY",
"Compendium.pf2e.spells-srd.Item.drmvQJETA3WZzXyw",
"Compendium.pf2e.spells-srd.Item.e36Z2t6tLdW3RUzZ",
"Compendium.pf2e.spells-srd.Item.fprqWKUc0jnMIyGU",
"Compendium.pf2e.spells-srd.Item.gISYsBFby1TiXfBt",
"Compendium.pf2e.spells-srd.Item.ivKnEtI1z4UqEKIA",
"Compendium.pf2e.spells-srd.Item.kuoYff1csM5eAcAP",
"Compendium.pf2e.spells-srd.Item.lbrWMnS2pecKaSVB",
"Compendium.pf2e.spells-srd.Item.lsR3RLEdBG4rcSzd",
"Compendium.pf2e.spells-srd.Item.nXmC2Xx9WmS5NsAo",
"Compendium.pf2e.spells-srd.Item.o6YCGx4lycsYpww4",
"Compendium.pf2e.spells-srd.Item.pZTqGY1MLRjgKasV",
"Compendium.pf2e.spells-srd.Item.pt3gEnzA159uHcJC",
"Compendium.pf2e.spells-srd.Item.pwzdSlJgYqN7bs2w",
"Compendium.pf2e.spells-srd.Item.q5qmNn144ZJGxnvJ",
"Compendium.pf2e.spells-srd.Item.qTr2oCgIXl703Whb",
"Compendium.pf2e.spells-srd.Item.qwlh6aDgi86U3Q7H",
"Compendium.pf2e.spells-srd.Item.r4HLQcYwB62bTayl",
"Compendium.pf2e.spells-srd.Item.sFwoKj0TsacsmoWj",
"Compendium.pf2e.spells-srd.Item.vLA0q0WOK2YPuJs6",
"Compendium.pf2e.spells-srd.Item.vLzFcIaSXs7YTIqJ",
"Compendium.pf2e.spells-srd.Item.vTQvfYu2llKQedmY",
"Compendium.pf2e.spells-srd.Item.vctIUOOgSmxAF0KG",
"Compendium.pf2e.spells-srd.Item.wzctak6BxOW8xvFV",
"Compendium.pf2e.spells-srd.Item.x5rGOmhDRDVQPrnW",
"Compendium.pf2e.spells-srd.Item.x7SPrsRxGb2Vy2nu",
"Compendium.pf2e.spells-srd.Item.x9RIFhquazom4p02",
"Compendium.pf2e.spells-srd.Item.xRgU9rrhmGAgG4Rc",
"Compendium.pf2e.spells-srd.Item.yH13KXUK2x093NUv",
"Compendium.pf2e.spells-srd.Item.yM3KTTSAIHhyuP14",
"Compendium.pf2e.spells-srd.Item.zlnXpME1T2uvn8Lr",
"Compendium.pf2e.spells-srd.Item.zul5cBTfr7NXHBZf",
]);
}
2 changes: 1 addition & 1 deletion src/module/system/module-art.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ModuleArt {
}
}

this.map.set(`Compendium.pf2e.${packName}.${actorId}`, actorArtPartial);
this.map.set(`Compendium.pf2e.${packName}.Actor.${actorId}`, actorArtPartial);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ declare global {
}

type CompendiumDocumentType = (typeof CONST.COMPENDIUM_DOCUMENT_TYPES)[number];
type CompendiumUUID = `Compendium.${string}.${string}` | `Compendium.${string}.${CompendiumDocumentType}.${string}`;
type CompendiumUUID = `Compendium.${string}.${CompendiumDocumentType}.${string}`;
type DocumentUUID = WorldDocumentUUID | CompendiumUUID | TokenDocumentUUID;

function fromUuid(uuid: CompendiumUUID, relative?: Maybe<ClientDocument>): Promise<CompendiumDocument | null>;
Expand Down
Loading