forked from GitHub-Mirrors/foundry-sw5e
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:
parent
f16383841b
commit
5bb253d9c3
56 changed files with 5440 additions and 3827 deletions
|
@ -96,9 +96,28 @@ export default class ActorSheet5eNPC 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 */
|
||||
/* -------------------------------------------- */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue