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

Added Second Chance Caste to the Education Module for Warrior Caste Washouts #4139

Merged
merged 7 commits into from
Jun 8, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Requires: #4127 & #4126

This PR adds the ability to select a 'second chance' Warrior Caste sub-caste for Warrior Caste washouts.

When Warrior Caste personnel washout of the Warrior Caste mhq will check that their course index does not match the index of the chosen second chance caste. If there is no match (and second chance is not set to NONE), then the aspirant washes into the chosen sub-caste.

If second chance is set to NONE, or the aspirant is washing out of the chosen sub-caste, they will washout into a civilian caste as normal.

- Introduced the SecondChanceCaste enum, providing options for Warrior Caste washouts
- Added SecondChanceCaste to Campaign Options with associated getters and setters
- Modified resource files to include text and tooltips for SecondChanceCaste
- Removed unnecessary parameters in the beginJourneyHome function of EducationController.java
@IllianiCBT IllianiCBT self-assigned this Jun 3, 2024
@IllianiCBT IllianiCBT added the Personnel Personnel-related Issues label Jun 3, 2024
# Conflicts:
#	MekHQ/resources/mekhq/resources/CreateCharacterDialog.properties
#	MekHQ/resources/mekhq/resources/CustomizePersonDialog.properties
#	MekHQ/src/mekhq/gui/dialog/CustomizePersonDialog.java
@IllianiCBT
Copy link
Collaborator Author

Resolved Conflicts

@SJuliez
Copy link
Member

SJuliez commented Jun 8, 2024

Yet again, conflicts :)
Also, see my comment. Can get rid of the NONE: case and end in default: return -1;

# Conflicts:
#	MekHQ/src/mekhq/gui/dialog/CustomizePersonDialog.java
- Added a guard clause to check for 'NONE' on secondChanceCasteIndex
- Adjusted code to avoid unnecessary operations
- Implemented exception throw for unexpected secondChanceCaste values
@IllianiCBT
Copy link
Collaborator Author

Addressed feedback and resolved conflicts

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 13.72549% with 88 lines in your changes missing coverage. Please review.

Project coverage is 10.28%. Comparing base (1149795) to head (b9c5243).
Report is 98 commits behind head on master.

Files Patch % Lines
...paign/personnel/education/EducationController.java 0.00% 54 Missing ⚠️
MekHQ/src/mekhq/gui/panes/CampaignOptionsPane.java 0.00% 18 Missing ⚠️
...hq/campaign/personnel/enums/SecondChanceCaste.java 64.70% 6 Missing ⚠️
...HQ/src/mekhq/gui/dialog/CustomizePersonDialog.java 0.00% 6 Missing ⚠️
MekHQ/src/mekhq/campaign/CampaignOptions.java 42.85% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4139      +/-   ##
============================================
- Coverage     10.28%   10.28%   -0.01%     
- Complexity     5793     5811      +18     
============================================
  Files           919      921       +2     
  Lines        125219   125741     +522     
  Branches      18550    18590      +40     
============================================
+ Hits          12883    12933      +50     
- Misses       111068   111538     +470     
- Partials       1268     1270       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SJuliez SJuliez merged commit c523ce4 into MegaMek:master Jun 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Personnel Personnel-related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants