Skip to content

Fix: Fixed Space Station Transport Requirements Using Wrong Getter#8518

Merged
HammerGS merged 2 commits intoMegaMek:mainfrom
IllianiBird:spaceStationGetTonnageBug
Dec 15, 2025
Merged

Fix: Fixed Space Station Transport Requirements Using Wrong Getter#8518
HammerGS merged 2 commits intoMegaMek:mainfrom
IllianiBird:spaceStationGetTonnageBug

Conversation

@IllianiBird
Copy link
Collaborator

spaceStation.getTonnage -> spaceStation.getWeight

@IllianiBird IllianiBird self-assigned this Dec 14, 2025
@IllianiBird IllianiBird added Bug Severity: Low Issues described as low severity as per the new issue form labels Dec 14, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner December 14, 2025 19:13
@HammerGS HammerGS requested a review from Copilot December 14, 2025 22:42
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 fixes a bug where the wrong getter method was being called on SpaceStation objects when calculating transport collar requirements. The code was incorrectly calling getTonnage() instead of getWeight() on Entity objects.

Key Changes:

  • Corrected method call from spaceStation.getTonnage() to spaceStation.getWeight() for proper weight calculation in collar requirement logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 12.28%. Comparing base (ce903c5) to head (e6e2474).
⚠️ Report is 47 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8518      +/-   ##
============================================
+ Coverage     12.25%   12.28%   +0.03%     
- Complexity     7370     7400      +30     
============================================
  Files          1286     1287       +1     
  Lines        165132   165298     +166     
  Branches      24832    24875      +43     
============================================
+ Hits          20239    20314      +75     
- Misses       142967   143045      +78     
- Partials       1926     1939      +13     

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

@psikomonkie psikomonkie left a comment

Choose a reason for hiding this comment

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

This wasn't causing any issues, right? Just cleaning it up?

@IllianiBird
Copy link
Collaborator Author

I don't think it was causing any issues.

@HammerGS HammerGS merged commit 851d056 into MegaMek:main Dec 15, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

4 participants