Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Dice): Update @planarally/dice to v0.7 #1534

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ tech changes will usually be stripped from release notes for the public
- Added a reroll button to history entries
- Add an option to roll 3D dice inside a dice box rather than over the playfield
- Input field now scrolls to the end after populating via the on screen buttons
- @planarally/dice:
- (this is the standalone dice library that handles most of the dice logic and rendering)
- Upgraded to v0.7
- Dice will now stop sliding smoother
- Clear state can be configured
- D100 dice now properly work in 3D for the full range (1-100 / 0-99)
- Currently hardcoded to 1-100 in the client, but the library can be told otherwise
- I18n:
- Added 95% i18n for zh (except diceTool)
- [server] Assets:
Expand Down
109 changes: 57 additions & 52 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"coverage": "vitest run --coverage"
},
"dependencies": {
"@babylonjs/core": "^7.20.1",
"@babylonjs/materials": "^7.20.1",
"@babylonjs/core": "^7.43.0",
"@babylonjs/materials": "^7.43.0",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/vue-fontawesome": "^3.0.8",
"@planarally/dice": "^0.6.0",
"@planarally/dice": "^0.7.0",
"mathjs": "^13.2.0",
"path-data-polyfill": "^1.0.6",
"socket.io-client": "^4.8.0",
Expand Down
8 changes: 6 additions & 2 deletions client/src/game/tools/variants/dice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ class DiceTool extends Tool implements ITool {
if (use3d) {
const dieDefaults = await generate3dOptions();
const { diceThrower } = await getDiceEnvironment();
roll = await rollString(input, diceState.raw.systems!["3d"], { thrower: diceThrower!, dieDefaults });
roll = await rollString(input, diceState.raw.systems!["3d"], {
thrower: diceThrower!,
dieDefaults,
d100Mode: 100 as const,
});
} else {
roll = await rollString(input, diceState.raw.systems!["2d"]);
roll = await rollString(input, diceState.raw.systems!["2d"], { d100Mode: 100 as const });
}

if (shareWith !== "none") {
Expand Down
Loading