M modules/bear_actor.js +16 -2
@@ 23,7 23,7 @@ export default class BearActor extends A
} 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 @@ export default class BearActor extends A
});
}
+ 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;
});
M template.json +2 -1
@@ 27,7 27,8 @@
"notes": ""
},
"vision": {
- "darkvision": false
+ "darkvision": false,
+ "torch": false
}
},
"character": {
M templates/sheets/bear-sheet.html +4 -0
@@ 34,6 34,10 @@
<label>Darkvision?</label>
<input type="checkbox" name="data.darkvision" {{checked data.data.darkvision}} />
</div>
+ <div>
+ <label>Torch?</label>
+ <input type="checkbox" name="data.torch" {{checked data.data.torch}} />
+ </div>
</div>
{{/if}}