diff --git a/module/documents/Actor/Player.mjs b/module/documents/Actor/Player.mjs index 2c5840d..7430fa1 100644 --- a/module/documents/Actor/Player.mjs +++ b/module/documents/Actor/Player.mjs @@ -2,6 +2,17 @@ import { DotDungeonActor } from "./GenericActor.mjs"; export class Player extends DotDungeonActor { + /* + These are special data properties that will be used by ActiveEffects to modify + certain limits within the actor, allowing for neat hacks that change these and + possible configuration of them. + */ + prepareBaseData() { + this.system.weapon_slots = 2; + this.system.inventory_slots = 0; + this.system.respawn_limit = 3; + }; + applyActiveEffects() { super.applyActiveEffects(); diff --git a/module/models/Actor/Player.mjs b/module/models/Actor/Player.mjs index e7ba912..1b71b47 100644 --- a/module/models/Actor/Player.mjs +++ b/module/models/Actor/Player.mjs @@ -14,14 +14,6 @@ export class PlayerData extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields; return { - /* - These are special data properties that will be used by ActiveEffects - to modify certain limits within the actor, allowing for neat hacks - that change these - */ - weapon_slots: new fields.NumberField({ initial: 2 }), - inventory_slots: new fields.NumberField({ initial: 0 }), - bytes: new fields.NumberField({ initial: 0, min: 0, @@ -77,11 +69,7 @@ export class PlayerData extends foundry.abstract.TypeDataModel { min: 0, integer: true }), - respawns: new fields.SchemaField({ - r1: new fields.BooleanField(), - r2: new fields.BooleanField(), - r3: new fields.BooleanField(), - }), + respawns: new fields.NumberField({ initial: 0, }), syncDelta: new fields.NumberField({ required: true, integer: true,