Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
Update to v0.6.2
Browse files Browse the repository at this point in the history
* Add support for Levels
* Add support for FoundryVTT v0.8.8 and v0.8.9
  • Loading branch information
1000nettles committed Oct 27, 2021
1 parent cecd302 commit 6b63922
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [0.6.2] - 2021-10-27

### Added

- Added support for FoundryVTT 0.8.8 - 0.8.9
- Added basic integration to the Levels module to ensure Hey, Wait! doesn't trigger on incorrect level

## [0.6.1] - 2021-06-16

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Hey, Wait! :raised_hand:

**0.8.x version:**
![Downloads](https://img.shields.io/github/downloads/1000nettles/hey-wait/latest/hey-wait-v0.6.1.zip?style=flat-square)
![Downloads](https://img.shields.io/github/downloads/1000nettles/hey-wait/latest/hey-wait-v0.6.2.zip?style=flat-square)

**0.7.x version:**
![Downloads](https://img.shields.io/github/downloads/1000nettles/hey-wait/v0.4.0/hey-wait-v0.4.0.zip?style=flat-square)
Expand Down
8 changes: 4 additions & 4 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hey-wait",
"title": "Hey, Wait!",
"description": "\"Hey, Wait!\" allows a GM to place \"event triggers\" as tiles on a scene.",
"version": "0.6.1",
"version": "0.6.2",
"author": "1000nettles",
"languages": [
{
Expand All @@ -16,10 +16,10 @@
],
"socket": true,
"minimumCoreVersion": "0.8.6",
"compatibleCoreVersion": "0.8.7",
"compatibleCoreVersion": "0.8.9",
"url": "https://github.com/1000nettles/hey-wait",
"manifest": "https://github.com/1000nettles/hey-wait/releases/download/v0.6.1/module.json",
"download": "https://github.com/1000nettles/hey-wait/releases/download/v0.6.1/hey-wait-v0.6.1.zip",
"manifest": "https://github.com/1000nettles/hey-wait/releases/download/v0.6.2/module.json",
"download": "https://github.com/1000nettles/hey-wait/releases/download/v0.6.2/hey-wait-v0.6.2.zip",
"license": "MIT",
"readme": "https://raw.githubusercontent.com/1000nettles/hey-wait/main/README.md"
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "hey-wait",
"version": "0.6.1",
"version": "0.6.2",
"description": "\"Hey, Wait!\" is a FoundryVTT module allowing a GM to place \"event triggers\" on a scene.",
"scripts": {
"build": "npx webpack --config webpack.config.js",
Expand Down
20 changes: 20 additions & 0 deletions src/module/triggering/TriggeringHandler.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* eslint-disable no-console */

/* global _levels */
/* global _levelsModuleName */

/**
* A class to handle any triggering logic and tile modification operations.
*/
Expand Down Expand Up @@ -83,6 +86,10 @@ export default class TriggeringHandler {
return false;
}

if (!this._checkIsValidWithOtherModules(tile, tokenDoc.object)) {
return false;
}

if (this._isPreviouslyTriggered(tile)) {
return false;
}
Expand Down Expand Up @@ -110,6 +117,19 @@ export default class TriggeringHandler {
);
}

_checkIsValidWithOtherModules(tile, token) {
// If the Levels module is enabled, ensure we don't trigger on a wrong level.
if (
typeof _levels !== 'undefined'
&& typeof _levelsModuleName !== 'undefined'
&& !_levels.isTokenInRange(token, tile)
) {
return false;
}

return true;
}

/**
* If the tile was previously triggered.
*
Expand Down

0 comments on commit 6b63922

Please sign in to comment.