# HG changeset patch # User Evan Giesel # Date 1634364069 18000 # Sat Oct 16 01:01:09 2021 -0500 # Node ID 3b1b63b76018d279a2b0ec9c1cd9e62be4c7abb9 # Parent 9b7038b713bf4272dea490863b2c9c2adbfa8e10 add a torch option diff --git a/modules/bear_actor.js b/modules/bear_actor.js --- a/modules/bear_actor.js +++ b/modules/bear_actor.js @@ -23,7 +23,7 @@ } else if (this.type === "enemy") { this.data.token.update({ vision: false, - actorLink: true, + actorLink: false, disposition: -1, displayName: CONST.TOKEN_DISPLAY_MODES.HOVER, displayBars: CONST.TOKEN_DISPLAY_MODES.HOVER, @@ -58,9 +58,23 @@ }); } + if (changed.data && changed.data.torch === true){ + this.data.token.update({ + dimLight: 40, + brightLight: 20 + }); + } else if (changed.data && changed.data.torch === false) { + this.data.token.update({ + dimLight: 0, + brightLight: 0 + }); + } + const docs_to_update = this.getActiveTokens(true).map(token => { - console.log(token); + // console.log(token); token.data.dimSight = this.data.token.dimSight; + token.data.dimLight = this.data.token.dimLight; + token.data.brightLight = this.data.token.brightLight; return token.data; }); diff --git a/template.json b/template.json --- a/template.json +++ b/template.json @@ -27,7 +27,8 @@ "notes": "" }, "vision": { - "darkvision": false + "darkvision": false, + "torch": false } }, "character": { diff --git a/templates/sheets/bear-sheet.html b/templates/sheets/bear-sheet.html --- a/templates/sheets/bear-sheet.html +++ b/templates/sheets/bear-sheet.html @@ -34,6 +34,10 @@ +
+ + +
{{/if}}