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

Fixed Award Tier Count Calculations in PersonViewPanel #4102

Merged
merged 1 commit into from
May 25, 2024

Conversation

IllianiCBT
Copy link
Collaborator

This commit updates the calculation of awardTierCount in the PersonViewPanel class.

The new logic determines awardTierCount as the minimum between the number of medal files and the maximum of either 1 or the number of awards divided by the AwardTierSize specified in the campaign options.

These changes affect ribbons, medals, and miscellaneous awards.

This commit fixes a bug reported on Discord, where the award image getters were counting from 1 instead of 0. Additionally, extra binders have been added to ensure the index is always within bounds.

This commit modifies the calculation of awardTierCount in the PersonViewPanel class. The new logic retrieves the minimum between the award's number of medal files and the maximum between 1 and the number of awards divided by the AwardTierSize in campaign options. The changes apply to ribbons, medals, and miscellaneous awards.
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@HammerGS HammerGS merged commit b7e8d67 into MegaMek:master May 25, 2024
4 checks passed
HammerGS added a commit that referenced this pull request May 25, 2024
MegaMek
+ Fix 5476: Update SV armor slots to 2 or 1 for Rating E or F respectively

MegaMekLab
+ Fix ##1514: Fix Atrocious table shading render speed

MekHQ
+ PR #4106: Use tabs in customize scenario dialog
+ PR #4105: Updated Post-Scenario Logging for Prisoners
+ PR #4104: Fixed Post-Scenario Tracking System's Handling of Multiple Personnel in autoAwards
+ PR #4102: Fixed Award Tier Count Calculations in PersonViewPanel
+ PR #4093: Added Negotiation and Scrounge Skill Settings for Administrator Personnel
+ PR #4054: Added Life Paths Campaign Options Tab, Added Education Module
            Very Important to read the documentation on this feature (See Docs folder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants