Skip to content

Commit

Permalink
update for latest version of Foundry, fix minor error
Browse files Browse the repository at this point in the history
  • Loading branch information
smilligan93 committed May 3, 2020
1 parent 8668157 commit 776a91e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions combatready.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,13 @@ Hooks.on("deleteCombat", function() {
* Handle combatant update
*/
Hooks.on("updateCombatant", function(context, parentId, data) {
let combat = game.combats.get(parentId);
let combatant = combat.data.combatants.find(o => o.id === data.id);
const combat = game.combats.get(parentId);
if (combat) {
const combatant = combat.data.combatants.find(o => o.id === data.id);

if (combatant.actor.owner) CombatReady.toggleCheck();
});
if (combatant.actor.owner) CombatReady.toggleCheck();
}
});

/**
* Handle combatant delete
Expand Down
9 changes: 5 additions & 4 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "combatready",
"title": "Combat Ready!",
"description": "'<b><i>My Combat Tracker is Ready</i></b>' Combat ready indicator to remind players of their turn, as well as time taken. ",
"version": "1.1.3",
"author": "Ken L. maintained by JacobMcAuley and Shawn Milligan [n3rf_herder#9026]",
"version": "1.1.4",
"author": "Ken L. maintained by Shawn Milligan [n3rf_herder#9026]",
"socket": true,
"languages": [
{
Expand Down Expand Up @@ -49,7 +49,8 @@
"styles" : ["combatready.css"],
"packs": [],
"url" : "https://github.com/JacobMcAuley/combatready",
"download" : "https://github.com/smilligan93/combatready/archive/master.zip",
"download" : "https://github.com/smilligan93/combatready/archive/v1.1.4.zip",
"manifest" : "https://raw.githubusercontent.com/smilligan93/combatready/master/module.json",
"minimumCoreVersion": "0.4.4"
"minimumCoreVersion": "0.4.4",
"compatibleCoreVersion": "0.5.5"
}

0 comments on commit 776a91e

Please sign in to comment.