Skip to content

PR: Refactored power generators to use new PowerGeneratorType instead of MiscType#7762

Merged
psikomonkie merged 2 commits intoMegaMek:mainfrom
psikomonkie:pr/buildings/better-power-generators
Dec 13, 2025
Merged

PR: Refactored power generators to use new PowerGeneratorType instead of MiscType#7762
psikomonkie merged 2 commits intoMegaMek:mainfrom
psikomonkie:pr/buildings/better-power-generators

Conversation

@psikomonkie
Copy link
Member

PR: Refactored power generators to be PowerGeneratorType extends MiscType instead of a MiscType. Instead of using subflags to mark what kind of StructureEngine a PowerGeneratorType has, we just keep the StructureEngine enum.

This is to support #7758 which is removing subflags.

There should be no gameplay impact from this - there are no units that use power generators.

…cType` instead of a `MiscType`. Instead of using subflags to mark what kind of `StructureEngine` a `PowerGeneratorType` has, we just keep the `StructureEngine` enum.
@psikomonkie psikomonkie requested a review from a team as a code owner December 12, 2025 17:04
@psikomonkie psikomonkie changed the title PR: Refactored power generators to be use new PowerGeneratorType instead of MiscType PR: Refactored power generators to use new PowerGeneratorType instead of MiscType Dec 12, 2025
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 29.19%. Comparing base (fb0c0fc) to head (8437b2b).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...gamek/src/megamek/common/units/BuildingEntity.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7762      +/-   ##
============================================
- Coverage     29.23%   29.19%   -0.05%     
+ Complexity    15281    15243      -38     
============================================
  Files          3120     3121       +1     
  Lines        298182   298184       +2     
  Branches      51947    51946       -1     
============================================
- Hits          87180    87047     -133     
- Misses       202438   202625     +187     
+ Partials       8564     8512      -52     

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

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@psikomonkie psikomonkie merged commit 3ccd6e4 into MegaMek:main Dec 13, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants