Fix for actor img not linked on token when change

Item class moved out of item's sheets folder
This commit is contained in:
Vlyan
2020-12-21 12:13:21 +01:00
parent f0d2f440e4
commit 3b33dd0c9c
4 changed files with 14 additions and 2 deletions

View File

@@ -113,7 +113,7 @@
"rank": "Rang",
"name": "Nom",
"social": {
"title": "Position Social",
"title": "Position Sociale",
"honor": "Honneur",
"glory": "Gloire",
"status": "Status",

View File

@@ -57,6 +57,18 @@ export class ActorL5r5e extends Actor {
await super.create(data, options);
}
/**
* Entity-specific actions that should occur when the Entity is updated
* @override
*/
update(data, options = {}) {
// Fix for token image unliked from character... dunno why
if (data.img) {
data["token.img"] = data.img;
}
return super.update(data, options);
}
/** @override */
prepareData() {
super.prepareData();

View File

@@ -14,7 +14,7 @@ import { RingDie } from "./dice/dietype/ring-die.js";
import { RollL5r5e } from "./dice/roll.js";
import { DicePickerDialog } from "./dice/dice-picker-dialog.js";
// Items
import { ItemL5r5e } from "./items/item.js";
import { ItemL5r5e } from "./item.js";
import { ItemSheetL5r5e } from "./items/item-sheet.js";
import { ArmorSheetL5r5e } from "./items/armor-sheet.js";
import { WeaponSheetL5r5e } from "./items/weapon-sheet.js";