RC-43 | Weapons | Populate Table Content

This commit is contained in:
Oliver-Akins 2024-12-30 21:29:03 -07:00
parent 5773c2e920
commit ff43ef2eb9
3 changed files with 39 additions and 5 deletions

View file

@ -42,4 +42,17 @@ export class WeaponData extends foundry.abstract.TypeDataModel {
prepareDerivedData() {
super.prepareDerivedData();
};
// #region Getters
get traitString() {
return [...this.traits].join(`, `);
}
get rangeString() {
if (this.range.short && this.range.long) {
return `${this.range.short} / ${this.range.long}`;
};
return String(this.range.short ?? this.range.long ?? ``);
}
// #endregion
};