GM Toolbox : Left clic do only actors with an active player as owner.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
Date format : day/month/year
|
Date format : day/month/year
|
||||||
|
|
||||||
|
## 1.9.4 - ??/??/2022 - ?
|
||||||
|
- GM Toolbox : Left clic do only actors with an active player as owner.
|
||||||
|
|
||||||
## 1.9.3 - 29/09/2022 - Combat Tracker
|
## 1.9.3 - 29/09/2022 - Combat Tracker
|
||||||
- Fix for L5R combat tracker bar who have disappeared.
|
- Fix for L5R combat tracker bar who have disappeared.
|
||||||
|
|
||||||
|
|||||||
@@ -278,6 +278,14 @@ export class ActorL5r5e extends Actor {
|
|||||||
return this.type === "army";
|
return this.type === "army";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this actor have an active player as owner
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
get hasPlayerOwnerActive() {
|
||||||
|
return game.users.find((u) => !!u.active && u.character?.id === this.id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if this actor can do a initiative roll
|
* Return true if this actor can do a initiative roll
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export class GmMonitor extends FormApplication {
|
|||||||
actors = game.actors.filter((e) => ids.includes(e.id));
|
actors = game.actors.filter((e) => ids.includes(e.id));
|
||||||
} else {
|
} else {
|
||||||
// If empty add pc with owner
|
// If empty add pc with owner
|
||||||
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwner);
|
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwnerActive);
|
||||||
this._saveActorsIds();
|
this._saveActorsIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ export class GmToolbox extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Manage left/right button
|
// Manage left/right button
|
||||||
if (!isAll && (!actor.isCharacter || !actor.hasPlayerOwner)) {
|
if (!isAll && (!actor.isCharacter || !actor.hasPlayerOwnerActive)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user