8000 Improvement: Converted Most Convoy Dialogs into Immersive Dialogs by IllianiBird · Pull Request #6855 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Converted Most Convoy Dialogs into Immersive Dialogs #6855

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

Merged
merged 6 commits into from
May 19, 2025

Conversation

IllianiBird
Copy link
Collaborator

The Resupply module was the birthplace of what became the Immersive Dialog format, but never itself used Immersive Dialogs. While there are still a couple of convoy dialogs using the old style, most have now been moved over.

Copy link
codecov bot commented May 3, 2025

Codecov Report

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

Project coverage is 12.03%. Comparing base (49d3af0) to head (a748dbc).
Report is 77 commits behind head on master.

Files with missing lines Patch % Lines
...ign/mission/resupplyAndCaches/PerformResupply.java 0.00% 26 Missing ⚠️
.../dialog/resupplyAndCaches/DialogContractStart.java 0.00% 10 Missing ⚠️
...n/mission/resupplyAndCaches/ResupplyUtilities.java 0.00% 6 Missing ⚠️
.../gui/dialog/resupplyAndCaches/DialogItinerary.java 0.00% 1 Missing ⚠️
...og/resupplyAndCaches/DialogPlayerConvoyOption.java 0.00% 1 Missing ⚠️
.../dialog/resupplyAndCaches/DialogResupplyFocus.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6855   +/-   ##
=========================================
  Coverage     12.03%   12.03%           
  Complexity     6889     6889           
=========================================
  Files          1103     1103           
  Lines        142284   142248   -36     
  Branches      21991    21994    +3     
=========================================
- Hits          17121    17119    -2     
+ Misses       123328   123296   -32     
+ Partials       1835     1833    -2     

☔ 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.

@HammerGS HammerGS requested a review from Copilot May 7, 2025 23:50
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 transitions most convoy and resupply dialogs to the new Immersive Dialog format and deprecates the old dialog implementations. Key changes include:

  • Replacing legacy dialogs (DialogRoleplayEvent, DialogInterception, etc.) with ImmersiveDialogSimple.
  • Updating resource key references from legacy keys (e.g. documentation.prompt) to outOfCharacter.* keys.
  • Removing unused UI components and refactoring dialog construction in several files.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
DialogRoleplayEvent.java Deprecated the old dialog and added the @deprecated annotation.
DialogResupplyFocus.java Updated resource key for focus description to the new immersive dialog style.
DialogPlayerConvoyOption.java Updated resource key for the dialog text to the new format.
DialogItinerary.java Changed resource key from documentation.prompt to outOfCharacter.itinerary.
DialogInterception.java Deprecated the dialog with a corresponding @deprecated annotation.
DialogContractStart.java Replaced custom panel layout with ImmersiveDialogSimple for contract start dialogs.
DialogAbandonedConvoy.java Marked as deprecated and noted as unused.
ResupplyUtilities.java Replaced dialog invocations with ImmersiveDialogSimple and refactored resource string calls.
PerformResupply.java Replaced Compute.randomInt with randomInt and updated dialog calls to use ImmersiveDialogSimple.
Resupply.properties Added new outOfCharacter resource keys and updated existing keys accordingly.
Comments suppressed due to low confidence (3)

MekHQ/src/mekhq/campaign/mission/resupplyAndCaches/PerformResupply.java:645

  • [nitpick] The use of 'GROUND_VEHICLE_DRIVER' may be ambiguous; consider clarifying its role or using a more descriptive constant to better convey its purpose.
speaker = campaign.newPerson(GROUND_VEHICLE_DRIVER, contract.getEmployerCode(), Gender.RANDOMIZE);

MekHQ/resources/mekhq/resources/Resupply.properties:17

  • Ensure that the newly added 'outOfCharacter.*' resource keys consistently replace all legacy keys across the dialogs and that their formatting meets the intended user display requirements.
outOfCharacter.abandoned=All units and personnel have been killed or captured...

MekHQ/src/mekhq/gui/dialog/resupplyAndCaches/DialogContractStart.java:81

  • The new usage of ImmersiveDialogSimple replaces a custom dialog layout, which changes modal behavior and disposal management; confirm that these dialog lifecycle aspects are handled appropriately.
new ImmersiveDialogSimple(campaign,

# Conflicts:
#	MekHQ/src/mekhq/campaign/mission/resupplyAndCaches/PerformResupply.java
@IllianiBird IllianiBird marked this pull request as ready for review May 19, 2025 23:12
@IllianiBird IllianiBird requested a review from a team as a code owner May 19, 2025 23:12
@IllianiBird IllianiBird merged commit dea8042 into MegaMek:master May 19, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0