Skip to content

Conversation

@IllianiBird
Copy link
Collaborator

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.

@IllianiBird IllianiBird self-assigned this Nov 21, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner November 21, 2025 01:41
@IllianiBird IllianiBird added the Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature label Nov 21, 2025
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 0% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.72%. Comparing base (f130d04) to head (a4b07b8).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
...ekhq/gui/dialog/AdvancedReplacementLimbDialog.java 0.00% 46 Missing ⚠️
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.
📢 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 November 21, 2025 02:25
Copilot finished reviewing on behalf of HammerGS November 21, 2025 02:29
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFE] GM Tool to utilise Advanced Surgery features for characters

1 participant