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 Automatic Bonus Parts Exchange at Contract End, Added Bonus Parts Display to Mission Stats Panel #4149

Merged
merged 6 commits into from
Jun 8, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Jun 4, 2024

Requires: #4138

At the end of an AtBContract any remaining Bonus Parts (that would otherwise be lost) are automatically exchanged for c-bills at a rate defined by the user (default: 500,000 c-bills). An optional cap on the number of parts exchanged can also be defined by the user (default: 10).

This does not otherwise affect Bonus Parts usage. So parts can be gained and used in the same way they always have. This PR just adds a small bonus in the event the user forgets to use their Bonus Parts.

I also added a Bonus Part count to the Mission Stats panel, so users don't need to go hunting to determine how many Bonus Parts they have available. This count is refreshed on new day

Closes

Closes #3390

- Added new feature to convert bonus parts into c-bills at the end of AtB contracts
- Implemented configuration options for bonus part value and maximum exchange count
- Added Bonus Part Exchange TransactionType
@IllianiCBT IllianiCBT self-assigned this Jun 4, 2024
@IllianiCBT IllianiCBT added AtB GUI StratCon Bugs relating strictly to StratCon Finances labels Jun 4, 2024
# Conflicts:
#	MekHQ/data/scenariomodifiers/OverwhelmingEnemyAirReinforcements.xml
#	MekHQ/data/scenariomodifiers/OverwhelmingEnemyGroundReinforcements.xml
#	MekHQ/data/scenariomodifiers/PiratesIncomingAir.xml
#	MekHQ/data/scenariomodifiers/PiratesIncomingGround.xml
#	MekHQ/data/scenariomodifiers/PiratesPresentAir.xml
#	MekHQ/data/scenariomodifiers/PiratesPresentGround.xml
#	MekHQ/data/scenariomodifiers/PrimaryAlliesAir.xml
#	MekHQ/data/scenariomodifiers/PrimaryAlliesGround.xml
#	MekHQ/src/mekhq/campaign/Campaign.java
#	MekHQ/src/mekhq/campaign/finances/enums/TransactionType.java
#	MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java
#	MekHQ/unittests/mekhq/campaign/finances/enums/TransactionTypeTest.java
@IllianiCBT
Copy link
Collaborator Author

Resolved the surprisingly numerous conflicts

# Conflicts:
#	MekHQ/src/mekhq/campaign/finances/enums/TransactionType.java
#	MekHQ/unittests/mekhq/campaign/finances/enums/TransactionTypeTest.java
@IllianiCBT
Copy link
Collaborator Author

Resolved conflicts

@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2024

Codecov Report

Attention: Patch coverage is 9.00901% with 101 lines in your changes missing coverage. Please review.

Project coverage is 10.27%. Comparing base (1149795) to head (36709f2).
Report is 106 commits behind head on master.

Files Patch % Lines
MekHQ/src/mekhq/gui/panes/CampaignOptionsPane.java 0.00% 42 Missing ⚠️
MekHQ/src/mekhq/gui/view/MissionViewPanel.java 0.00% 20 Missing ⚠️
MekHQ/src/mekhq/gui/BriefingTab.java 0.00% 15 Missing ⚠️
MekHQ/src/mekhq/campaign/CampaignOptions.java 25.00% 12 Missing ⚠️
...rs/companyGenerators/AbstractCompanyGenerator.java 0.00% 2 Missing ⚠️
MekHQ/src/mekhq/campaign/Campaign.java 0.00% 1 Missing ⚠️
MekHQ/src/mekhq/campaign/mission/AtBContract.java 0.00% 1 Missing ⚠️
MekHQ/src/mekhq/campaign/mission/Loot.java 0.00% 1 Missing ⚠️
...ign/storyarc/storytrigger/AddUnitStoryTrigger.java 0.00% 1 Missing ⚠️
MekHQ/src/mekhq/gui/CampaignGUI.java 0.00% 1 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4149      +/-   ##
============================================
- Coverage     10.28%   10.27%   -0.01%     
- Complexity     5793     5810      +17     
============================================
  Files           919      920       +1     
  Lines        125219   125730     +511     
  Branches      18550    18590      +40     
============================================
+ Hits          12883    12925      +42     
- Misses       111068   111535     +467     
- Partials       1268     1270       +2     

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

@SJuliez SJuliez merged commit 2628f7f 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
AtB Finances GUI StratCon Bugs relating strictly to StratCon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Stratcon - Supply Point / Bonus Part conversion to C-Bills at the end of contract
3 participants