8000 Fix: Fixed Placement of GM Prisoner Ransom Option by IllianiBird · Pull Request #6869 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: Fixed Placement of GM Prisoner Ransom Option #6869

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 1 commit into from
May 6, 2025

Conversation

IllianiBird
Copy link
Collaborator

I spotted during a recent user stream that the ransom options had accidentally been left in the main personnel right-click menu instead of the GM section. This PR just moves them.

@IllianiBird IllianiBird added Bug GUI Severity: Low Issues described as low severity as per the new issue form labels May 4, 2025
@IllianiBird IllianiBird self-assigned this May 4, 2025
@IllianiBird IllianiBird marked this pull request as ready for review May 4, 2025 07:36
Copy link
codecov bot commented May 4, 2025

Codecov Report

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

Project coverage is 11.52%. Comparing base (3f2d5f0) to head (d658b27).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
.../mekhq/gui/adapter/PersonnelTableMouseAdapter.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6869   +/-   ##
=========================================
  Coverage     11.52%   11.52%           
+ Complexity     6567     6566    -1     
=========================================
  Files          1100     1100           
  Lines        140971   140971           
  Branches      21845    21845           
=========================================
+ Hits          16243    16244    +1     
+ Misses       123030   123025    -5     
- Partials       1698     1702    +4     

☔ 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 6, 2025 02:46
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 moves the GM prisoner ransom options out of the m AF6F ain personnel right‐click menu into the designated GM section.

  • Removes the ransom menu items from general personnel context
  • Adds GM-specific ransom options in a separate menu block
  • Eliminates inline GM user checks in the earlier context
Files not reviewed (1)
  • MekHQ/resources/mekhq/resources/GUI.properties: Language not supported
Comments suppressed due to low confidence (2)

MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java:3897

  • [nitpick] Both ransom options use the same resource key "ransom.text". If these options are meant to be clearly distinguishable (for example, standard versus friendly ransom), consider using a distinct resource key for the friendly ransom option.
menu.add(newMenuItem(resources.getString("ransom.text"), CMD_RANSOM_FRIENDLY));

MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java:3892

  • It is unclear if the new GM menu block should enforce a GM user check. Consider adding an explicit check (or a comment clarifying that this code path is only reachable by GM users) to ensure that non-GM users do not see these sensitive options.
if (StaticChecks.areAllPrisoners(selected)) {

@Scoppio Scoppio merged commit 7cc0ef2 into MegaMek:master May 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GUI Severity: Low Issues described as low severity as per the new issue form
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0