-
Notifications
You must be signed in to change notification settings - Fork 200
Fix #8265: Added Skip Surgery Option for GMs in Advanced Surgery Dialog #8272
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: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8272 +/- ##
=========================================
Coverage 11.72% 11.72%
- Complexity 7532 7536 +4
=========================================
Files 1271 1271
Lines 162724 162770 +46
Branches 24515 24520 +5
=========================================
+ Hits 19082 19092 +10
- Misses 141644 141677 +33
- Partials 1998 2001 +3 ☔ 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 adds a GM-only "Skip Surgery" button to the Advanced Replacement Limb Dialog, allowing Game Masters to add prosthetics and implants to characters without the normal surgery mechanics (costs, skill checks, and recovery injuries). The implementation refactors several common surgery operations into reusable helper methods, improving code maintainability.
Key Changes:
- Added a GM-only button that bypasses surgery costs, skill checks, and recovery injuries
- Refactored surgery logic into four helper methods (
processOldInjuryRemoval,addMarkerInjury,addImplantsAndAbilities,getPlannedSurgeries) to reduce code duplication - Enhanced javadoc coverage for existing and new methods
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| MekHQ/src/mekhq/gui/dialog/AdvancedReplacementLimbDialog.java | Added GM skip surgery button, implemented onGMConfirm method for GM-controlled prosthetic application, refactored common surgery operations into reusable helper methods with comprehensive javadoc |
| MekHQ/resources/mekhq/resources/AdvancedReplacementLimbDialog.properties | Added button label for the GM skip surgery feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix #8265
As per title, now GMs can opt to skip a surgery. This makes it easy for GMs to add prosthetics and implants to characters at will.
Skip surgery skips the cost, skill checks, and recovery injuries entirely.