mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +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 = {};
|
||||
|
||||
// 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, {
|
||||
system: {
|
||||
size: CONFIG.DH.ACTOR.tokenSize.medium.id
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ export default class DHToken extends CONFIG.Token.documentClass {
|
|||
const actor = document.actor;
|
||||
if (actor?.system.metadata.usesSize) {
|
||||
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({
|
||||
width: tokenSize,
|
||||
height: tokenSize
|
||||
|
|
@ -165,7 +165,7 @@ export default class DHToken extends CONFIG.Token.documentClass {
|
|||
if (this.actor?.system.metadata.usesSize) {
|
||||
const tokenSizes = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).tokenSizes;
|
||||
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;
|
||||
height = tokenSize ?? height;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue