mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
.
This commit is contained in:
parent
215006731a
commit
0f52eb0492
2 changed files with 3 additions and 3 deletions
|
|
@ -76,7 +76,7 @@ export default class DhpActor extends Actor {
|
||||||
const update = {};
|
const update = {};
|
||||||
|
|
||||||
// Set default token size. Done here as we do not want to set a datamodel default, since that would apply the sizing to third party actor modules that aren't set up with the size system.
|
// Set default token size. Done here as we do not want to set a datamodel default, since that would apply the sizing to third party actor modules that aren't set up with the size system.
|
||||||
if (this.system.metadata.usesSize) {
|
if (this.system.metadata.usesSize && !data.system?.size) {
|
||||||
Object.assign(update, {
|
Object.assign(update, {
|
||||||
system: {
|
system: {
|
||||||
size: CONFIG.DH.ACTOR.tokenSize.medium.id
|
size: CONFIG.DH.ACTOR.tokenSize.medium.id
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export default class DHToken extends CONFIG.Token.documentClass {
|
||||||
const actor = document.actor;
|
const actor = document.actor;
|
||||||
if (actor?.system.metadata.usesSize) {
|
if (actor?.system.metadata.usesSize) {
|
||||||
const tokenSize = tokenSizes[actor.system.size];
|
const tokenSize = tokenSizes[actor.system.size];
|
||||||
if (tokenSize && tokenSize !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
if (tokenSize && actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
||||||
document.updateSource({
|
document.updateSource({
|
||||||
width: tokenSize,
|
width: tokenSize,
|
||||||
height: tokenSize
|
height: tokenSize
|
||||||
|
|
@ -165,7 +165,7 @@ export default class DHToken extends CONFIG.Token.documentClass {
|
||||||
if (this.actor?.system.metadata.usesSize) {
|
if (this.actor?.system.metadata.usesSize) {
|
||||||
const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes;
|
const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes;
|
||||||
const tokenSize = tokenSizes[this.actor.system.size];
|
const tokenSize = tokenSizes[this.actor.system.size];
|
||||||
if (tokenSize && tokenSize !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
if (tokenSize && this.actor.system.size !== CONFIG.DH.ACTOR.tokenSize.custom.id) {
|
||||||
width = tokenSize ?? width;
|
width = tokenSize ?? width;
|
||||||
height = tokenSize ?? height;
|
height = tokenSize ?? height;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue