diff --git a/modules/actors/ecryme-actor.js b/modules/actors/ecryme-actor.js index 8b16fce..83d12c2 100644 --- a/modules/actors/ecryme-actor.js +++ b/modules/actors/ecryme-actor.js @@ -54,6 +54,18 @@ export class EcrymeActor extends Actor { super._preUpdate(changed, options, user); } + /* -------------------------------------------- */ + async _preCreate(data, options, user) { + await super._preCreate(data, options, user); + + // Configure prototype token settings + const prototypeToken = {}; + if (this.type === "pc") Object.assign(prototypeToken, { + sight: { enabled: true }, actorLink: true, disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY + }); + this.updateSource({ prototypeToken }); + } + /* -------------------------------------------- */ getMoneys() { let comp = this.items.filter(item => item.type == 'money'); diff --git a/system.json b/system.json index 9c6c54d..7289b1b 100644 --- a/system.json +++ b/system.json @@ -90,7 +90,7 @@ ], "title": "Ecryme, le Jeu de RĂ´les", "url": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme", - "version": "11.0.16", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/archive/fvtt-ecryme-v11.0.16.zip", + "version": "11.0.17", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/archive/fvtt-ecryme-v11.0.17.zip", "background": "systems/fvtt-ecryme/images/assets/ecryme_extract_panel_01.webp" } \ No newline at end of file diff --git a/template.json b/template.json index 220cac8..f280409 100644 --- a/template.json +++ b/template.json @@ -1,7 +1,7 @@ { "Actor": { "types": [ - "pc","annency" + "pc","annency", "npc" ], "templates": { "biodata": { @@ -196,6 +196,12 @@ "annency" ] }, + "npc": { + "templates": [ + "biodata", + "core" + ] + }, "pc": { "templates": [ "biodata",