From 310b3327d6014616ecab5f496aef71cde646284d Mon Sep 17 00:00:00 2001 From: p4535992 Date: Sat, 9 Apr 2022 19:23:20 +0200 Subject: [PATCH] version 3.2.15 --- changelog.md | 2 +- package.json | 2 +- src/module.json | 8 ++++---- src/module/api.ts | 2 -- src/module/module.ts | 8 ++++---- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/changelog.md b/changelog.md index 60c05f2..bfc620e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,4 @@ -## 3.2.14 +## 3.2.14-15 - Some minor update diff --git a/package.json b/package.json index 44abc0c..7f91c1e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "foundryvtt-mountup", "title": "FoundryVTT Mount Up!", "description": "Allows tokens to carry or be carried by other tokens. This is completely system agnostic, and fully customizable to fit right into your game.", - "version": "3.2.14", + "version": "3.2.15", "scripts": { "package": "gulp package", "build": "gulp build && gulp link", diff --git a/src/module.json b/src/module.json index 9745945..85ac7c9 100644 --- a/src/module.json +++ b/src/module.json @@ -2,7 +2,7 @@ "name": "foundryvtt-mountup", "title": "FoundryVTT Mount Up!", "description": "Allows tokens to carry or be carried by other tokens. This is completely system agnostic, and fully customizable to fit right into your game.", - "version": "3.2.14", + "version": "3.2.15", "author": "Brunhine, p4535992", "type": "module", "socket": true, @@ -50,9 +50,9 @@ "compatibleCoreVersion": "9", "url": "https://github.com/p4535992/MountUp", "manifest": "https://github.com/p4535992/MountUp/releases/latest/download/module.json", - "download": "https://github.com/p4535992/MountUp/releases/download/v3.2.14/module.zip", - "readme": "https://github.com/p4535992/MountUp/blob/v3.2.14/README.md", - "changelog": "https://github.com/p4535992/MountUp/blob/v3.2.14/changelog.md", + "download": "https://github.com/p4535992/MountUp/releases/download/v3.2.15/module.zip", + "readme": "https://github.com/p4535992/MountUp/blob/v3.2.15/README.md", + "changelog": "https://github.com/p4535992/MountUp/blob/v3.2.15/changelog.md", "bugs": "https://github.com/p4535992/MountUp/issues", "allowBugReporter": true, "manifestPlusVersion": "1.2.0", diff --git a/src/module/api.ts b/src/module/api.ts index f0f3463..780cabb 100644 --- a/src/module/api.ts +++ b/src/module/api.ts @@ -1,5 +1,3 @@ -import EmbeddedCollection from '@league-of-foundry-developers/foundry-vtt-types/src/foundry/common/abstract/embedded-collection.mjs'; -import { EffectChangeData } from '@league-of-foundry-developers/foundry-vtt-types/src/foundry/common/data/data.mjs/effectChangeData'; import type { ActiveEffectData, ActorData, diff --git a/src/module/module.ts b/src/module/module.ts index 615d085..4986d64 100644 --- a/src/module/module.ts +++ b/src/module/module.ts @@ -1,7 +1,7 @@ import API from './api'; import { MountHud } from './mountHud'; import { MountManager } from './mountManager'; -import { TokenData } from '@league-of-foundry-developers/foundry-vtt-types/src/foundry/common/data/data.mjs'; +import type { TokenData } from '@league-of-foundry-developers/foundry-vtt-types/src/foundry/common/data/data.mjs'; import CONSTANTS from './constants'; import { debug, getElevationToken, warn } from './lib/lib'; import HOOKS from './hooks'; @@ -190,12 +190,12 @@ export const readyHooks = async () => { } }); - Hooks.on('preDeleteToken', async (scene, token: Token) => { - const isPlayerOwned = token.document.isOwner; + Hooks.on('preDeleteToken', async (tokenDocument: TokenDocument, data:any, updateData: TokenData) => { + const isPlayerOwned = tokenDocument.isOwner; if (!game.user?.isGM && !isPlayerOwned) { return; } - await MountManager.handleTokenDelete(token.id); + await MountManager.handleTokenDelete(tokenDocument.id); //return true; });