-
Notifications
You must be signed in to change notification settings - Fork 188
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
Improvement: Converted Most Convoy Dialogs into Immersive Dialogs #6855
Conversation
Codecov ReportAttention: Patch coverage is
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. 🚀 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 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
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.