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 autoAwards Support for the Education Module #4118

Merged
merged 13 commits into from
Jun 1, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented May 28, 2024

This PR primarily adds autoAwards support to the Education module. However, adding this support required more extensive rebuilding of the Education module system that handles students passing through the stages of education (journey to, education, journey from) than anticipated. This led to a rework of how the Education Module moves students between education stages.

I'll be honest, the previous code wasn't my best work, so I took the opportunity to rework it into a far more robust system that should be easier to read and maintain. Additionally, autoAwards documentation has been updated to include this new functionality.

I also restored the autoAwards report image that went missing at some point. No idea when, either way: it's back.

…CampaignOptions, removed auto award eduEnableAutoAwardsIntegration from Campaign Options and added TrainingAwards class for auto awards processing
- Modified Academy class to include type in parameters for Academy creation
- Adjusted testAcademyCreationAllFields method in Academy unit test to accommodate changes
- Simplified variable initializations in Training Awards class
* Added parameter to `EducationController.processNewDay` to bypass age restrictions during education process.
* Introduced logic to handle graduation, awarding and journey home process in `PersonnelTableMouseAdapter`.
* Refactored the `Campaign.java` to use the updated `EducationController.processNewDay`.
* Adjusted the education levels classification in `Academy.java`.
* Fixed award attribute defaults to avoid null values in `Award.java`.
* Adjusted award size definitions in `standard.xml`.
* Updated Academy type definitions in `Local Academies.xml`.
- Changed setEduDaysOfEducation value to unify the logic across modules
- Removed redundant completeEducation and completeJourneyTo methods
- Adjusted return type of Process method to accommodate for changes
- Removed unnecessary whitespace in PersonnelTableMouseAdapter
* Added new field 'eduEducationStage' in Person class to help keep track of the person's education status
* Adjusted the EducationController to utilise the new eduEducationStage property during person's education journey
* Updated PersonViewPanel to handle the changes effected in the education process
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.

Just a couple of spots that need a touch-up, otherwise looks good!

@IllianiCBT IllianiCBT requested a review from Sleet01 May 29, 2024 08:18
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!

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

Successfully merging this pull request may close these issues.

2 participants