[V14] Refactor ArmorChange schema and fix some bugs (#1742)

* Refactor ArmorChange schema and fix some bugs

* Add current back to schema

* Fixed so changing armor values and taking damage works again

* Fixed so that scrolltexts for armor changes work again

* Removed old marks on armor.system

* Restored damageReductionDialog armorScore.value

* Use toggle for css class addition/removal

* Fix armor change type choices

* Added ArmorChange DamageThresholds

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
Carlos Fernandez 2026-03-21 08:53:12 -04:00 committed by GitHub
parent 6193153596
commit 50dcbf4396
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 356 additions and 428 deletions

View file

@ -1,5 +1,5 @@
import { itemAbleRollParse } from '../helpers/utils.mjs';
import { RefreshType, socketEvent } from '../systemRegistration/socket.mjs';
import { RefreshType } from '../systemRegistration/socket.mjs';
export default class DhActiveEffect extends foundry.documents.ActiveEffect {
/* -------------------------------------------- */
@ -155,11 +155,6 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
/* Methods */
/* -------------------------------------------- */
/**@inheritdoc */
static applyChange(actor, change, options) {
super.applyChange(actor, change, options);
}
/**@inheritdoc*/
static applyChangeField(model, change, field) {
change.value = Number.isNumeric(change.value)
@ -168,7 +163,7 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
super.applyChangeField(model, change, field);
}
_applyChangeUnguided(actor, change, changes, options) {
static _applyChangeUnguided(actor, change, changes, options) {
change.value = DhActiveEffect.getChangeValue(actor, change, change.effect);
super._applyChangeUnguided(actor, change, changes, options);
}