Skip to content

Commit

Permalink
fix(v12): initial v12 support
Browse files Browse the repository at this point in the history
* update talent and minion size checkers
* update changelog
  • Loading branch information
wrycu committed May 21, 2024
1 parent 63ff0ac commit 4f00481
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
`2.1.0` - ?

- COMPATABILITY: Module updated to work with FoundryVTT v12

`2.0.6` - 2024-04-06

- NEW FEATURE: Configurable Book of Boba Fett-style title cards can be played like the opening crawl (thanks `grafeisen`!)
Expand Down
5 changes: 3 additions & 2 deletions scripts/minionsize_sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ export function minionsize_sync(source, ...args) {
} else if (source === "canvasReady") {
log(module_name, "caught scene-transition, looking for minions");
let tokens = canvas.tokens.placeables.filter(
(searchedtoken) => searchedtoken.document.actor.type == "minion"
(searchedtoken) => searchedtoken.document.actor?.type == "minion"
);
for (var x = 0; x < tokens.length; x++) {
let token = tokens[x];
minionSize = token?.document?._actor?.system?.quantity.value;
log(module_name, `found token ${token.name}`);
minionSize = token?.document?.actor?.system?.quantity.value;
update_minion_status(token, minionSize);
}
} else {
Expand Down
5 changes: 4 additions & 1 deletion scripts/talent_checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export function talent_checker() {
log(module_name, "Detected scene load.");
for (let i = 0; i < canvas.tokens.placeables.length; i++) {
// begin javascript sucks
let actor = game.actors.get(canvas.tokens.placeables[i].actor.id);
let actor = game.actors.get(canvas.tokens.placeables[i].actor?.id);
if (!actor) {
continue;
}
let token = canvas.tokens.placeables[i];
if (game.settings.get("ffg-star-wars-enhancements", "talent-checker-enable")) {
log(module_name, "Found token " + actor.name + "; searching for Adversary talent");
Expand Down

0 comments on commit 4f00481

Please sign in to comment.