Fixed linked actor image compatibility with Tokenizer.

This commit is contained in:
Vlyan
2022-03-16 18:20:47 +01:00
parent 638ea5859f
commit 35a7bbf974
5 changed files with 8 additions and 4 deletions

View File

@@ -100,10 +100,12 @@ export class ActorL5r5e extends Actor {
// Only on linked Actor
if (!!data["token.actorLink"] || (data["token.actorLink"] === undefined && this.data.token.actorLink)) {
// Update the token name/image if the sheet name/image changed, but only if they was previously the same
// Update the token name/image if the sheet name/image changed, but only if
// they was previously the same, and token img was not set in same time
["name", "img"].forEach((fieldName) => {
if (
data[fieldName] &&
!data["token." + fieldName] &&
this.data[fieldName] === this.data.token[fieldName] &&
this.data[fieldName] !== data[fieldName]
) {