Skip to content

Commit

Permalink
Use current UUID format exclusively
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam committed Jun 5, 2024
1 parent a74ffb1 commit f1616ce
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 99 deletions.
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
9 changes: 6 additions & 3 deletions src/scripts/hooks/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from "@module/canvas/index.ts";
import { setPerceptionModes } from "@module/canvas/perception/modes.ts";
import { PointVisionSourcePF2e } from "@module/canvas/perception/point-vision-source.ts";
import { MaterialSystemData } from "@module/journal-entry/page/data.ts";
import { RegionBehaviorPF2e } from "@scene/region-behavior/document.ts";
import { EnvironmentBehaviorTypePF2e } from "@scene/region-behavior/environment.ts";
import { PF2ECONFIG } from "@scripts/config/index.ts";
Expand All @@ -38,13 +39,15 @@ export const Init = {
CONFIG.PF2E = PF2ECONFIG;
CONFIG.debug.ruleElement ??= false;

CONFIG.Item.dataModels.kit = KitSystemData;
CONFIG.Item.dataModels.melee = MeleeSystemData;

// Assign canvas layer and placeable classes
CONFIG.AmbientLight.layerClass = LightingLayerPF2e;
CONFIG.AmbientLight.objectClass = AmbientLightPF2e;

CONFIG.Item.dataModels.kit = KitSystemData;
CONFIG.Item.dataModels.melee = MeleeSystemData;

CONFIG.JournalEntryPage.dataModels.material = MaterialSystemData;

CONFIG.MeasuredTemplate.objectClass = MeasuredTemplatePF2e;
CONFIG.MeasuredTemplate.layerClass = TemplateLayerPF2e;
CONFIG.MeasuredTemplate.defaults.angle = 90;
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

0 comments on commit f1616ce

Please sign in to comment.