-
Notifications
You must be signed in to change notification settings - Fork 188
Improvement: Upgraded Contract Automation to Use the New Immersive Dialog Format #6849
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: Upgraded Contract Automation to Use the New Immersive Dialog Format #6849
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6849 +/- ##
=========================================
Coverage 12.03% 12.04%
- Complexity 6889 6894 +5
=========================================
Files 1103 1103
Lines 142284 142289 +5
Branches 21991 21991
=========================================
+ Hits 17121 17133 +12
+ Misses 123328 123323 -5
+ 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
Upgrades the contract automation dialogs to use the new Immersive Dialog format while deprecating the legacy dialog component. Key changes include:
- Deprecation of the ContractAutomationDialog class.
- Replacement of legacy dialog classes with ImmersiveDialogSimple.
- Updates to resource string formatting and report message generation.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
MekHQ/src/mekhq/gui/dialog/ContractAutomationDialog.java | Deprecated unused dialog class. |
MekHQ/src/mekhq/campaign/market/contractMarket/ContractAutomation.java | Updated dialog implementations and resource formatting for both mothball and transit operations. |
MekHQ/resources/mekhq/resources/ContractAutomation.properties | Modified resource string patterns to use indexed placeholders. |
@@ -189,7 +223,8 @@ public static void performAutomatedActivation(Campaign campaign) { | |||
MekHQ.triggerEvent(new UnitChangedEvent(unit)); | |||
|
|||
if (unit.isMothballed()) { | |||
campaign.addReport(String.format(resources.getString("activationFailed.text"), unit.getName())); | |||
campaign.addReport(getFormattedTextAt(RESOURCE_BUNDLE, "activationFailed.text"), |
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.
The call to addReport for activation failure is split into two parameters instead of formatting the string with the hyperlinked name. Consider changing it to campaign.addReport(getFormattedTextAt(RESOURCE_BUNDLE, "activationFailed.text", unit.getHyperlinkedName())).
Copilot uses AI. Check for mistakes.
These dialogs come from the intermediary period when we were still trying to figure out a replacement dialog system that eventually evolved into the Immersive Dialog format.
Old
New