Fixed Skill Value Out-Of-Range Errors in Dialogs#6467
Merged
IllianiBird merged 1 commit intoMar 28, 2025
Conversation
- Added the `clamp` utility function to ensure skill levels and bonuses are constrained within valid ranges. - Updated `CustomizePersonDialog` and `CreateCharacterDialog` to use `clamp` for correcting invalid skill values modified by users. - Prevented issues with JSpinner components caused by out-of-range skill values. - Ensured consistent application of min/max constraints for skills (level: 0-10, bonus: -8 to 8).
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6467 +/- ##
============================================
- Coverage 11.28% 11.28% -0.01%
+ Complexity 6287 6285 -2
============================================
Files 1072 1072
Lines 136372 136400 +28
Branches 21088 21092 +4
============================================
+ Hits 15394 15395 +1
- Misses 119439 119468 +29
+ Partials 1539 1537 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rjhancock
approved these changes
Mar 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clamputility function to ensure skill levels and bonuses are constrained within valid ranges.CustomizePersonDialogandCreateCharacterDialogto useclampfor correcting invalid skill values modified by users.Fix Sentry Report