Séparation de l'Actor Créature

This commit is contained in:
2023-11-04 17:48:50 +01:00
parent e5bb2e9afc
commit bea4124388
9 changed files with 414 additions and 508 deletions

View File

@ -163,13 +163,15 @@ export class RdDBaseActor extends Actor {
async prepareActorData() { }
async computeEtatGeneral() { }
/* -------------------------------------------- */
findPlayer() {
return game.users.players.find(player => player.active && player.character?.id == this.id);
}
isCreatureEntite() { return this.type == 'creature' || this.type == 'entite'; }
isCreature() { return this.type == 'creature'; }
isCreatureEntite() { return this.isCreature() || this.isEntite() }
isCreature() { return false }
isEntite(typeentite = []) { return false }
isPersonnage() { return this.type == 'personnage'; }
isVehicule() { return this.type == 'vehicule'; }
isPersonnage() { return false }
getItem(id, type = undefined) {
const item = this.items.get(id);
if (type == undefined || (item?.type == type)) {