Update Core to 1.4.1

Update Core to 1.4.1 and internal Version to 1.4.1.R1-A8
This commit is contained in:
supervj 2021-08-06 16:38:15 -04:00
parent f16383841b
commit 5bb253d9c3
56 changed files with 5440 additions and 3827 deletions

View file

@ -111,9 +111,28 @@ export default class ActorSheet5eNPCNew extends ActorSheet5e {
// Creature Type
data.labels["type"] = this.actor.labels.creatureType;
// Armor Type
data.labels["armorType"] = this.getArmorLabel();
return data;
}
/* -------------------------------------------- */
/**
* Format NPC armor information into a localized string.
* @return {string} Formatted armor label.
*/
getArmorLabel() {
const ac = this.actor.data.data.attributes.ac;
const label = [];
if (ac.calc === "default") label.push(this.actor.armor?.name || game.i18n.localize("SW5E.ArmorClassUnarmored"));
else label.push(game.i18n.localize(CONFIG.SW5E.armorClasses[ac.calc].label));
if (this.actor.shield) label.push(this.actor.shield.name);
return label.filterJoin(", ");
}
/* -------------------------------------------- */
/* Object Updates */
/* -------------------------------------------- */