8000 Feature: #4838 Added Faction Standing System by IllianiBird · Pull Request #7071 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature: #4838 Added Faction Standing System #7071

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

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

IllianiBird
Copy link
Collaborator
@IllianiBird IllianiBird commented May 21, 2025

Incorporates Changes from #7062

Close #4838

This PR adds the 'Faction Standing' system to MekHQ. This tracks how positively a campaign is viewed in the eyes of other factions.

This PR represents the 'minimum viable implementation'. Faction Standing is tracked and reacts to starting campaigns, contracts, prisoner executions, and refusing Batchalls. However, there is no effect to a high or low standing. There are also no GUI components. The aim of this PR is to get Faction Standing into the hands of reviewers when it's small, rather than expecting people to review it only when its feature complete.

Future PRs will include...

  • GUI support
  • GM support
  • Standing Effects
  • Roleplay events

This system supports both StratCon and non-StratCon play.

IllianiBird and others added 21 commits May 18, 2025 21:43
@IllianiBird IllianiBird self-assigned this May 21, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner May 21, 2025 00:37
@IllianiBird IllianiBird added Tests Issues or Pull Requests related to the project tests Campaign Options Relates to, or includes, campaign option changes New Feature Used with the RFE tag to indicate a new feature labels May 21, 2025
@HammerGS HammerGS requested a review from Copilot May 21, 2025 00:44
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 introduces a minimum viable implementation for the Faction Standing system in MekHQ, including tracking fame changes from various campaign events, integrating faction standing updates into GUI dialogs and mission processing, and adding relevant unit tests.

  • New unit tests for faction standing functionalities
  • Integration of faction standing processing into campaign dialogs, contract handling, and mission completion
  • Updates to XML serialization and campaign daily processes to support the new system

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
MekHQ/unittests/mekhq/campaign/universe/factionStanding/FactionStandingsTest.java Added tests to validate starting fame values and various processing methods for faction standing changes
MekHQ/unittests/mekhq/campaign/universe/factionStanding/FactionStandingUtilitiesTest.java Added tests for utility methods validating standing level boundaries and negotiation/resupply modifiers
MekHQ/unittests/mekhq/campaign/universe/factionStanding/FactionStandingLevelTest.java Validates correct label/description mapping for different faction types and level uniqueness
MekHQ/src/mekhq/gui/dialog/DataLoadingDialog.java Integrated faction standing initialization at campaign load time
MekHQ/src/mekhq/gui/dialog/ContractMarketDialog.java Processes faction standing changes when contracts are accepted
MekHQ/src/mekhq/gui/campaignOptions/contents/GeneralTab.java Removed deprecated reputation components and added further reading panel modifications
MekHQ/src/mekhq/gui/campaignOptions/CampaignOptionsPane.java Added a systems tab for reputation and faction standing, and updated preset handling accordingly
MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java, BriefingTab.java, PrisonerEventManager.java Integrated faction standing updates within prisoner-related and mission events
MekHQ/src/mekhq/campaign/universe/factionStanding/FactionStandingUtilities.java New utility class providing fame-to-standing mapping and related modifiers
MekHQ/src/mekhq/campaign/Campaign.java Integrated faction standing processing into daily campaign events and XML IO

Copy link
codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 34.42623% with 480 lines in your changes missing coverage. Please review.

Project coverage is 12.59%. Comparing base (cea6c73) to head (ba2137f).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...mekhq/gui/campaignOptions/contents/SystemsTab.java 0.00% 181 Missing ⚠️
...ign/universe/factionStanding/FactionStandings.java 64.35% 77 Missing and 31 partials ⚠️
...se/factionStanding/enums/FactionStandingLevel.java 48.18% 54 Missing and 3 partials ⚠️
MekHQ/src/mekhq/campaign/Campaign.java 5.40% 35 Missing ⚠️
...erse/factionStanding/FactionStandingUtilities.java 6.06% 29 Missing and 2 partials ⚠️
MekHQ/src/mekhq/gui/BriefingTab.java 0.00% 15 Missing ⚠️
...mekhq/gui/campaignOptions/CampaignOptionsPane.java 0.00% 12 Missing ⚠️
MekHQ/src/mekhq/gui/dialog/DataLoadingDialog.java 0.00% 10 Missing ⚠️
...kHQ/src/mekhq/gui/dialog/ContractMarketDialog.java 0.00% 9 Missing ⚠️
.../mekhq/gui/adapter/PersonnelTableMouseAdapter.java 0.00% 8 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7071      +/-   ##
============================================
+ Coverage     12.41%   12.59%   +0.17%     
- Complexity     7242     7359     +117     
============================================
  Files          1116     1120       +4     
  Lines        143890   144704     +814     
  Branches      22151    22311     +160     
============================================
+ Hits          17862    18219     +357     
- Misses       124188   124605     +417     
- Partials       1840     1880      +40     

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

@IllianiBird IllianiBird changed the title Feature: Added Faction Standing System Feature: #4838 Added Faction Standing System May 21, 2025
@rjhancock
Copy link
Collaborator
8D80

Resolve the CampaignOptions conflicts so we don't re-add the removed options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Campaign Options Relates to, or includes, campaign option changes New Feature Used with the RFE tag to indicate a new feature Tests Issues or Pull Requests related to the project tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] Introduce Homebrew Faction Loyalty Module to MekHQ
2 participants
0