Skip to content

Commit

Permalink
Add release.generation check to retrieval of setting moved in V13 (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam authored Nov 2, 2024
1 parent 2f8b964 commit 8edba73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/module/actor/sheet/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ abstract class ActorSheetPF2e<TActor extends ActorPF2e> extends ActorSheet<TActo
});
}

/** @todo fixme for V13 */
constructor(actor: TActor, options?: Partial<ActorSheetOptions>) {
super(actor, options);

// On initial opening, adjust width according to `fontSize` setting
const baseWidth = this.options.width;
if (typeof baseWidth === "number") {
if (game.release.generation === 12 && typeof baseWidth === "number") {
const calculatedWidth = (baseWidth * game.settings.get("core", "fontSize")) / 5;
this.position.width &&= Math.floor(Math.clamp(calculatedWidth, 0.75 * baseWidth, 1024));
}
Expand Down

0 comments on commit 8edba73

Please sign in to comment.