v10 migration

This commit is contained in:
2022-08-16 23:01:30 +02:00
parent 4c5f3b088e
commit 66f70897ed
7 changed files with 106 additions and 31 deletions

View File

@@ -52,6 +52,7 @@ export class CrucibleActorSheet extends ActorSheet {
moneys: duplicate(this.actor.getMoneys()),
encCapacity: this.actor.getEncumbranceCapacity(),
saveRolls: this.actor.getSaveRoll(),
conditions: this.actor.getConditions(),
containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent,
options: this.options,

View File

@@ -183,6 +183,12 @@ export class CrucibleActor extends Actor {
return listItem
}
/* -------------------------------------------- */
getConditions() {
let comp = duplicate(this.items.filter(item => item.type == 'condition') || []);
CrucibleUtility.sortArrayObjectsByName(comp)
return comp;
}
/* -------------------------------------------- */
getWeapons() {
let comp = duplicate(this.items.filter(item => item.type == 'weapon') || []);