Improvement: Added Optional Tracking of MASH Theatres#7807
Conversation
| public void setFieldKitchenWithinCapacity(boolean fieldKitchenWithinCapacity) { | ||
| this.fieldKitchenWithinCapacity = fieldKitchenWithinCapacity; | ||
| } |
There was a problem hiding this comment.
I spotted we weren't saving this data for some odd reason lost to time. So while I was in this neck of the woods I added saving. Nominally this would have caused only minor issues as the data is refreshed on new day.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7807 +/- ##
============================================
- Coverage 12.14% 12.13% -0.01%
Complexity 7352 7352
============================================
Files 1214 1215 +1
Lines 153291 153457 +166
Branches 23200 23228 +28
============================================
+ Hits 18610 18617 +7
- Misses 132753 132908 +155
- Partials 1928 1932 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces optional tracking of MASH (Mobile Army Surgical Hospital) Theatres in the campaign's TO&E, allowing players to cap the maximum number of concurrent patients based on available MASH Theatre-equipped units rather than solely on doctor capacity.
Key changes:
- Added campaign options to enable MASH Theatre tracking and configure capacity per theatre (default: 25 patients)
- MASH Theatre capacity now acts as an upper limit on total patients across all doctors when enabled
- Updated UI components to display MASH Theatre capacity alongside hospital bed information
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| MASHCapacity.java | New utility class to calculate total MASH Theatre capacity from eligible units |
| CampaignOptions.java | Added fields and getters/setters for MASH Theatre tracking options |
| Campaign.java | Added capacity tracking fields, daily update logic, and capacity checking methods |
| PersonnelTab.java | Added UI controls for configuring MASH Theatre options |
| InfirmaryTab.java | Updated doctor assignment logic to respect MASH Theatre capacity limits |
| OptimizeInfirmaryAssignments.java | Modified assignment algorithm to honor global MASH Theatre capacity |
| MedicalController.java | Added verification to unassign patients when theatre capacity is exceeded |
| CampaignSummary.java | Updated facility report to display MASH Theatre capacity information |
| NagController.java | Modified to pass MASH Theatre capacity to untreated personnel checks |
| UntreatedPersonnelNagDialog.java | Updated to consider MASH Theatre capacity in nag calculations |
| CampaignXmlParser.java | Added XML parsing for persisting MASH Theatre capacity state |
| CampaignOptionsMarshaller.java | Added XML serialization for MASH Theatre options |
| CampaignOptionsUnmarshaller.java | Added XML deserialization for MASH Theatre options |
| CampaignOptionsDialog.properties | Added UI labels and tooltips for MASH Theatre configuration |
| MedicalController.properties | Added error message for exceeding theatre capacity |
| GlossaryEntry.properties | Updated Hospital Beds glossary entry to document MASH Theatre feature |
| TutorialHyperlinkPanel.properties | Updated tutorial links to reference MASH Theatres |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
With this PR we've added a campaign option that allows for the tracking of MASH Theatres in a players' TO&E.
If enabled, the maximum number of patients a campaign can support - across all doctors - is capped by the campaign's MASH Theatre capacity. The capacity of threatres defaults to 25, but can be changed in campaign options.