Skip to content

Commit

Permalink
Merge pull request #63 from McGregor777/0.8.2
Browse files Browse the repository at this point in the history
0.8.2
  • Loading branch information
Grégory Soupé authored Mar 26, 2024
2 parents b1aa76f + 9c22c4a commit ceca529
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/DicePool.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class DicePool
async roll()
{
const roll = WFRP3eRoll.create(
this.renderDiceExpression(),
this.formula,
this.checkData?.actor ? this.checkData.actor.getRollData() : {},
{checkData: this.checkData, flavor: this.flavor, startingSymbols: this.symbols}
);
Expand Down
1 change: 1 addition & 0 deletions modules/WFRP3eRoll.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export default class WFRP3eRoll extends Roll
if(!Number.isNumeric(total)) {
throw new Error(game.i18n.format("DICE.ErrorNonNumeric", {formula: this.formula}));
}

return total;
}

Expand Down
8 changes: 4 additions & 4 deletions modules/applications/DicePoolBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default class DicePoolBuilder extends FormApplication
{
// if sound was not passed search for sound dropdown value
if(!this.sound) {
const sound = html.find(".sound-selection")?.[0]?.value;
const sound = this.element.find(".sound-selection")?.[0]?.value;

if(sound) {
this.sound = sound;
Expand Down Expand Up @@ -174,21 +174,21 @@ export default class DicePoolBuilder extends FormApplication
}

if(!this.flavor) {
const flavor = html.find(".flavor-text")?.[0]?.value;
const flavor = this.element.find(".flavor-text")?.[0]?.value;

if(flavor)
this.flavor = flavor;
}

const sentToPlayer = html.find(".user-selection")?.[0]?.value;
const sentToPlayer = this.element.find(".user-selection")?.[0]?.value;

if(sentToPlayer) {
let container = $(`<div class="dice-pool"></div>`)[0];
this.object.renderAdvancedPreview(container);

const messageText = `<div>
<div>${game.i18n.localize("WFRP3e.SentDicePoolRollHint")}</div>
${$(container).html()}
${$(container).this.element()}
<button class="special-pool-to-player">${game.i18n.localize("WFRP3e.SentDicePoolRoll")}</button>
</div>`;

Expand Down

0 comments on commit ceca529

Please sign in to comment.