FEAT: create isNPC geeter and add the prop on metada on actors

FEAT: create common method for documents sheets
FEAT: create BaseActorSheet and implementation
This commit is contained in:
Joaquin Pereyra 2025-07-06 12:49:08 -03:00
parent 608920c193
commit 98fee6096d
11 changed files with 302 additions and 418 deletions

View file

@ -3,13 +3,15 @@
* @typedef {Object} ActorDataModelMetadata
* @property {string} label - A localizable label used on application.
* @property {string} type - The system type that this data model represents.
* @property {Boolean} isNPC - This data model represents a NPC?
*/
export default class BaseDataActor extends foundry.abstract.TypeDataModel {
/** @returns {ActorDataModelMetadata}*/
static get metadata() {
return {
label: 'Base Actor',
type: 'base'
type: 'base',
isNPC: true,
};
}

View file

@ -28,7 +28,8 @@ export default class DhCharacter extends BaseDataActor {
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {
label: 'TYPES.Actor.character',
type: 'character'
type: 'character',
isNPC: false,
});
}