Skip to content

Commit

Permalink
fix(dice): fix dice evaluated bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wrycu committed May 26, 2024
1 parent eabcb5d commit dbd5298
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ffg-star-wars-enhancements.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ function register_hooks() {
we may want to monkeypatch a different function in the future. this location doesn't seem to have access
to the actual weapon in use. I'm not sure if we actually care yet, but worth considering.
*/
if (!this.evaluated) await this.evaluate();
if (!this.evaluated) {
try {
await this.evaluate();
} catch (e) {
// do nothing
log("ffg-star-wars-enhancements", "Error evaluating roll: " + e);
}
}
var data = attack_animation(this, ...args);
return wrapped(...data);
}
Expand Down

0 comments on commit dbd5298

Please sign in to comment.