-
Notifications
You must be signed in to change notification settings - Fork 188
Feature: Added Monthly Food and Housing Expenses from A Time of War #6863
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6863 +/- ##
============================================
+ Coverage 12.03% 12.06% +0.03%
- Complexity 6889 6917 +28
============================================
Files 1103 1103
Lines 142284 142388 +104
Branches 21991 22016 +25
============================================
+ Hits 17121 17184 +63
- Misses 123328 123370 +42
+ Partials 1835 1834 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces new monthly expenses functionality for food and housing, adding optional fees that are deducted each month based on active personnel and in-unit students.
- Updated FinancesTab UI to include new checkboxes for enabling food and housing expenses.
- Enhanced Finances and Accountant logic to calculate and debit monthly food and housing expenses.
- Modified CampaignOptions, Campaign, and resource files to support the new expense configuration.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
MekHQ/src/mekhq/gui/campaignOptions/contents/FinancesTab.java | Added new checkboxes for food and housing expenses in the UI. |
MekHQ/src/mekhq/campaign/finances/Finances.java | Updated campaign daily operations to debit food and housing expenses. |
MekHQ/src/mekhq/campaign/finances/Accountant.java | Introduced methods and constants to calculate the monthly food and housing expenses. |
MekHQ/src/mekhq/campaign/CampaignOptions.java | Added new configuration options (get/set) for food and housing expense settings. |
MekHQ/src/mekhq/campaign/Campaign.java | Added helper method for retrieving active personnel including in-unit students. |
MekHQ/resources/mekhq/resources/Finances.properties | Updated properties with new resource strings for food and housing expenses. |
MekHQ/resources/mekhq/resources/CampaignOptionsDialog.properties | Updated dialog labels and tooltips for the new expense options. |
# Conflicts: # MekHQ/src/mekhq/campaign/Campaign.java # MekHQ/src/mekhq/gui/campaignOptions/contents/FinancesTab.java
This adds a small, optional, money sink to campaign play. If enabled, each month the player will pay a small housing and/or food expenses fee. Expenses are calculated based on the number of active personnel, prisoners, or students (in in-unit academies).
This process has full Unit Test coverage.
Food Expenses
If enabled, food will always be deducted at a rate based on each character's status and rank:
These values are taken from ATOW pg. 336.
Housing Expenses
If enabled, housing costs will be deducted at a rate based on each character's status and rank. Characters assigned to WarShips, JumpShips, or Space Stations do not incur a housing cost. All housing costs are waived while the campaign is in transit.
These values are derived from those found in ATOW pg. 336 and include all necessary utilities and additional expenses.