Skip to content

Commit

Permalink
Merge branch 'extract-no-img' into 'master'
Browse files Browse the repository at this point in the history
Fix type of RollTableSource to reflect that the img property is optional

See merge request hooking/foundry-vtt---pathfinder-2e!6169
  • Loading branch information
CarlosFdez committed Nov 26, 2021
2 parents 5960060 + 4ca0e9b commit e13932b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packs/scripts/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ function sanitizeDocument<T extends PackEntry>(entityData: T, { isEmbedded } = {
delete entityData.flags[flagScope];
}
}
entityData.img = entityData.img.replace(

entityData.img &&= entityData.img.replace(
"https://assets.forge-vtt.com/bazaar/systems/pf2e/assets/",
"systems/pf2e/"
) as ImagePath;
Expand Down
2 changes: 1 addition & 1 deletion types/foundry/common/data/data/macro-data.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ declare module foundry {
_id: string;
name: string;
type: "chat" | "script";
img: string;
img: ImagePath;
actorIds: string[];
author: string;
command: string;
Expand Down
4 changes: 3 additions & 1 deletion types/foundry/common/data/data/roll-table-data.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ declare module foundry {
interface RollTableSource {
_id: string;
name: string;
img: string;
img?: ImagePath;
description: string;
results: TableResultSource[];
formula: string;
Expand All @@ -48,6 +48,8 @@ declare module foundry {
}

interface RollTableData extends Omit<RollTableSource, "results"> {
img: ImagePath;

readonly _source: RollTableSource;
}
}
Expand Down

0 comments on commit e13932b

Please sign in to comment.