Snapshot pre-AE data on actors (closes #178)
This commit is contained in:
parent
d479ef7559
commit
ec6378092f
3 changed files with 28 additions and 13 deletions
|
|
@ -5,11 +5,16 @@ export class Player extends DotDungeonActor {
|
|||
applyActiveEffects() {
|
||||
super.applyActiveEffects();
|
||||
|
||||
// These are the (groups of) fields that ActiveEffects may modify safely
|
||||
// and remain editable in the sheet. This needs to be done because of default
|
||||
// Foundry behaviour that otherwise prevents these fields from being edited
|
||||
delete this.overrides.system.stats;
|
||||
delete this.overrides.system.skills;
|
||||
/*
|
||||
These are the (groups of) fields that ActiveEffects may modify safely and
|
||||
remain editable in the sheet. This needs to be done because of default
|
||||
Foundry behaviour that otherwise prevents these fields from being edited.
|
||||
The deletes must use optional chaining otherwise they can cause issues
|
||||
during the document preparation lifecycle as an actor with no AE's affecting
|
||||
anything in one of these areas will result in these paths being undefined.
|
||||
*/
|
||||
delete this.overrides.system?.stats;
|
||||
delete this.overrides.system?.skills;
|
||||
};
|
||||
|
||||
async createCustomPet() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue