Add a getter for retrieving equipped weapons easily
This commit is contained in:
parent
2497c492bf
commit
dfc8964296
1 changed files with 5 additions and 0 deletions
|
|
@ -155,6 +155,11 @@ export class EntityData extends foundry.abstract.TypeDataModel {
|
|||
};
|
||||
|
||||
// #region Getters
|
||||
get equippedWeapons() {
|
||||
const weapons = this.parent.itemTypes.weapon;
|
||||
return weapons.filter(w => w.system.equipped);
|
||||
};
|
||||
|
||||
get equippedArmour() {
|
||||
const armours = this.parent.itemTypes.armour;
|
||||
const slots = Object.fromEntries(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue