Skip to content

Commit

Permalink
fix ready set roll
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryBeaver committed Jan 15, 2023
1 parent 0b979d7 commit 3e9097b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
## 2.2.x feature: Time To Craft
### 2.2.2 fix worldtime is zero
### 2.2.2 workaround for ready set roll
This fix should work for the current version of ready set roll 1.3.14.
Might break at any other version ! a request for more robust interface has been made:
### 2.2.1 fix worldtime is zero
Crafting does not become success when the worldtime is not advancecd.
Sadly I could not automatically fix old crafting processes without breaking unfinished crafting processes.
### 2.2.0 feature: Time To Craft
Expand Down
9 changes: 8 additions & 1 deletion src/Crafting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,17 @@ export class Crafting implements CraftingData {
} else {
roll = await this.actor.rollSkill(this.recipe.skill.name);
}
let resultValue = roll.total
if(resultValue === undefined){
if(roll.fields !== undefined && roll.fields[2] !== undefined ){
resultValue = roll.fields[2][1]?.roll?.total;
}
}

this.result._skill = {
dc: this.recipe.skill.dc,
name: skillName,
total: roll.total
total: resultValue
}
}
}
Expand Down

0 comments on commit 3e9097b

Please sign in to comment.