Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Version 0.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Sep 21, 2021
1 parent 158a34c commit 2a84856
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.2.10]

- Some very small fix
- Add github workflow

## [0.2.9] Merge another update of [Teshynil](https://github.com/Teshynil)

- Merge PR [Cleaning, formatting and bug corrections](https://github.com/p4535992/conditional-visibility/pull/3)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "conditional-visibility",
"title": "Conditional Visibility",
"description": "Hide tokens from some players, but not others, based on the senses the players have. Uses unknown, newspaper, and foggy icons made by <a href=\"https://www.flaticon.com/authors/freepik\" title=\"Freepik\">Freepik</a>, from <a href=\"https://www.flaticon.com/\" title=\"Flaticon\"> www.flaticon.com</a>. Moon icon made by <a href=\"https://www.flaticon.com/authors/iconixar\" title=\"iconixar\">iconixar</a> from <a href=\"https://www.flaticon.com/\" title=\"Flaticon\"> www.flaticon.com</a>",
"version": "0.2.9",
"version": "0.2.10",
"scripts": {
"package": "gulp package",
"build": "gulp build && gulp link",
Expand Down
8 changes: 4 additions & 4 deletions src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "conditional-visibility",
"title": "Conditional Visibility",
"description": "Hide tokens from some players, but not others, based on the senses the players have. Uses unknown, newspaper, and foggy icons made by <a href=\"https://www.flaticon.com/authors/freepik\" title=\"Freepik\">Freepik</a>, from <a href=\"https://www.flaticon.com/\" title=\"Flaticon\"> www.flaticon.com</a>. Moon icon made by <a href=\"https://www.flaticon.com/authors/iconixar\" title=\"iconixar\">iconixar</a> from <a href=\"https://www.flaticon.com/\" title=\"Flaticon\"> www.flaticon.com</a>",
"version": "0.2.9",
"version": "0.2.10",
"author": "Greg Ludington, p4535992, Szefo09, Teshynil",
"type": "module",
"socket": true,
Expand Down Expand Up @@ -62,9 +62,9 @@
"manifestPlusVersion": "1.2.0",
"url": "https://github.com/p4535992/conditional-visibility",
"manifest": "https://github.com/p4535992/conditional-visibility/releases/latest/download/module.json",
"download": "https://github.com/p4535992/conditional-visibility/releases/download/v0.2.9/module.zip",
"readme": "https://github.com/p4535992/conditional-visibility/blob/v0.2.9/README.md",
"changelog": "https://github.com/p4535992/conditional-visibility/blob/v0.2.9/changelog.md",
"download": "https://github.com/p4535992/conditional-visibility/releases/download/v0.2.10/module.zip",
"readme": "https://github.com/p4535992/conditional-visibility/blob/v0.2.10/README.md",
"changelog": "https://github.com/p4535992/conditional-visibility/blob/v0.2.10/changelog.md",
"bugs": "https://github.com/p4535992/conditional-visibility/issues",
"allowBugReporter": true,
"dependencies": [
Expand Down
10 changes: 6 additions & 4 deletions src/module/ConditionalVisibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ export class ConditionalVisibility {
} else {
if (getGame().user?.isGM === false) {
const activeTokenDocuments = <TokenDocument[]>getGame().user?.character?.getActiveTokens();
for (const tokenDocument of activeTokenDocuments) {
const tok = getCanvas().tokens?.placeables.find((tok) => tok.id === tokenDocument.id);
if (tok) {
srcTokens.push(tok);
if(activeTokenDocuments){
for (const tokenDocument of activeTokenDocuments) {
const tok = getCanvas().tokens?.placeables.find((tok) => tok.id === tokenDocument.id);
if (tok) {
srcTokens.push(tok);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/module/systems/ConditionalVisibilitySystem5e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class ConditionalVisibilitySystem5e extends DefaultConditionalVisibilityS
});
}
setTimeout(() => {
effect.parent.getActiveTokens().forEach((e) => {
effect.parent.getActiveTokens()?.forEach((e) => {
e.alpha = 1;
e.visible = true;
e.data.hidden = false;
Expand Down
2 changes: 1 addition & 1 deletion src/module/systems/ConditionalVisibilitySystemPf2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class ConditionalVisibilitySystemPf2e extends DefaultConditionalVisibilit
});
}
setTimeout(() => {
effect.parent.getActiveTokens().forEach((e) => {
effect.parent.getActiveTokens()?.forEach((e) => {
e.alpha = 1;
e.visible = true;
e.data.hidden = false;
Expand Down

0 comments on commit 2a84856

Please sign in to comment.