-
Notifications
You must be signed in to change notification settings - Fork 188
feat: add actual board for acar #6938
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6938 +/- ##
============================================
+ Coverage 11.71% 11.97% +0.26%
- Complexity 6672 6795 +123
============================================
Files 1101 1102 +1
Lines 141461 141516 +55
Branches 21909 21919 +10
============================================
+ Hits 16573 16953 +380
+ Misses 123187 122759 -428
- Partials 1701 1804 +103 ☔ 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 PR introduces a new board creation utility to support a broader range of scenarios for auto-resolving battles. Key changes include:
- Adding ScenarioUtils.java for board creation based on Scenario settings.
- Updating BriefingTab.java to remove the AtBScenario cast and enable auto-resolve for all scenario types.
- Modifying MekHQ.java to accept a generic Scenario in startAutoResolve and integrate the new board generation logic.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
MekHQ/src/mekhq/utilities/ScenarioUtils.java | New utility that creates Board objects based on scenario data. |
MekHQ/src/mekhq/gui/BriefingTab.java | Updates auto-resolve call to use the generic Scenario parameter. |
MekHQ/src/mekhq/MekHQ.java | Updates startAutoResolve signature and integrates board logic. |
Comments suppressed due to low confidence (1)
MekHQ/src/mekhq/gui/BriefingTab.java:1424
- [nitpick] The previous condition that enabled auto-resolve only for AtBScenario has been removed. Please confirm that enabling btnAutoResolveScenario for all Scenario types is intended.
btnAutoResolveScenario.setEnabled(canStartGame);
mapSettings.setMedium(MapSettings.MEDIUM_ATMOSPHERE); | ||
} | ||
} else { | ||
File mapgenFile = new File("data/mapgen/" + mapName + ".xml"); |
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.
Consider extracting the hard-coded "data/mapgen/" directory into a named constant to improve maintainability and simplify future directory changes.
Copilot uses AI. Check for mistakes.
As this is marked for 50.07 I'm gonna flip it to draft so there's no risk of it being accidentally merged |
private ScenarioUtils() {} | ||
|
||
/** | ||
* Creates a game board based on the settings in the provided Scenario. |
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.
This is cool, I'm guessing this will allow you to better track the location of units for things like range and closing? Plus planetary effects?
No description provided.