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

Commit

Permalink
version 3.2.24
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Jul 5, 2022
1 parent 6dfc8cd commit 531c42b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 3.2.24

- Made clean up hud button always aviable for gm

### 3.2.23

- Add a checking for when is been dlete a rider or a mount attached
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": "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.23",
"version": "3.2.24",
"scripts": {
"package": "gulp package",
"build": "gulp build && gulp link",
Expand Down
6 changes: 3 additions & 3 deletions src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.23",
"version": "3.2.24",
"author": "Brunhine, p4535992",
"authors": [
{
Expand Down Expand Up @@ -67,8 +67,8 @@
"url": "https://github.com/p4535992/MountUp",
"manifest": "https://github.com/p4535992/MountUp/releases/latest/download/module.json",
"download": "https://github.com/p4535992/MountUp/releases/latest/download/module.zip",
"readme": "https://github.com/p4535992/MountUp/blob/v3.2.23/README.md",
"changelog": "https://github.com/p4535992/MountUp/blob/v3.2.23/changelog.md",
"readme": "https://github.com/p4535992/MountUp/blob/v3.2.24/README.md",
"changelog": "https://github.com/p4535992/MountUp/blob/v3.2.24/changelog.md",
"bugs": "https://github.com/p4535992/MountUp/issues",
"allowBugReporter": true,
"manifestPlusVersion": "1.2.0",
Expand Down
14 changes: 7 additions & 7 deletions src/module/mountHud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ export class MountHud {
this.addRemoveRidersButton(html, hudToken);
} else if (MountManager.isaRider(mountOrRider.id)) {
this.addDismountButton(html, hudToken);
} else {
this.addCleanupButton(html, hudToken);
}
this.addCleanupButton(html, hudToken);
} else if (<number>canvas.tokens?.controlled.length > 1) {
//ui.notifications.warn(`${MODULE_NAME}! : You must be sure to select only the token mount`);
this.addMountButton(html, hudToken);
Expand Down Expand Up @@ -126,11 +125,12 @@ export class MountHud {
const token = <Token>canvas.tokens?.placeables.find((t: Token) => {
return isStringEquals(hudToken._id, t.id);
});
if (
token &&
getProperty(<Actor>token.actor, `data.flags.${CONSTANTS.MODULE_NAME}`) &&
Object.keys(getProperty(<Actor>token.actor, `data.flags.${CONSTANTS.MODULE_NAME}`)).length > 0
) {
// if (
// token &&
// getProperty(<Actor>token.actor, `data.flags.${CONSTANTS.MODULE_NAME}`) &&
// Object.keys(getProperty(<Actor>token.actor, `data.flags.${CONSTANTS.MODULE_NAME}`)).length > 0
// ) {
if (token && game.user?.isGM) {
let button = this.buildButton(html, `Clean up munt up flags from ${hudToken.name}`, `fa-horse`);
button = this.addSlashForFLags(button);

Expand Down

0 comments on commit 531c42b

Please sign in to comment.