8000 feat: add actual board for acar by Scoppio · Pull Request #6938 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Scoppio
Copy link
Collaborator
@Scoppio Scoppio commented May 9, 2025

No description provided.

@Scoppio Scoppio self-assigned this May 9, 2025
@Scoppio Scoppio requested a review from a team as a code owner May 9, 2025 15:25
@Scoppio Scoppio added For New Dev Cycle ACAR Any Issues related to the ACAR (Abstract Combat Auto Resolve) System labels May 9, 2025
Copy link
codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Project coverage is 11.97%. Comparing base (2a032da) to head (813aafc).
Report is 50 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/utilities/ScenarioUtils.java 0.00% 28 Missing ⚠️
MekHQ/src/mekhq/MekHQ.java 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Scoppio Scoppio force-pushed the feat/acar-blurb branch from d917a6d to db468be Compare May 9, 2025 19:03
@HammerGS HammerGS requested a review from Copilot May 10, 2025 20:06
Copy link
Contributor
@Copilot Copilot AI left a 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");
Copy link
Preview
Copilot AI May 10, 2025

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.

@IllianiBird
Copy link
Collaborator

As this is marked for 50.07 I'm gonna flip it to draft so there's no risk of it being accidentally merged

@IllianiBird IllianiBird marked this pull request as draft May 10, 2025 21:40
private ScenarioUtils() {}

/**
* Creates a game board based on the settings in the provided Scenario.
Copy link
Collaborator

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?

@Scoppio Scoppio force-pushed the feat/acar-blurb branch from bc01d19 to 1fdd2ad Compare May 17, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACAR Any Issues related to the ACAR (Abstract Combat Auto Resolve) System For New Dev Cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0