Some localization, style and smaller changes

This commit is contained in:
WBHarry 2026-01-13 15:37:05 +01:00
parent a554ec0e4d
commit 048510074c
9 changed files with 137 additions and 151 deletions

View file

@ -686,10 +686,10 @@ export default class DhCharacter extends BaseDataActor {
const newHopeMax = this.system.resources.hope.max + diff;
const newHopeValue = Math.min(newHopeMax, this.system.resources.hope.value);
if (newHopeValue != this.system.resources.hope.value) {
changes.system.resources = {
hope: {
value: newHopeValue
}
if (!changes.system.resources) changes.system.resources = { hope: { value: 0 } };
changes.system.resources.hope = {
...changes.system.resources.hope,
value: changes.system.resources.hope.value + newHopeValue
};
}
}
@ -710,7 +710,7 @@ export default class DhCharacter extends BaseDataActor {
}
static migrateData(source) {
if (typeof (source.scars) === 'object') source.scars = 0;
if (typeof source.scars === 'object') source.scars = 0;
return super.migrateData(source);
}
}