Skip to content
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

PartsStore - Fix EquipmentParts and OmniPods - Fixes Hatchets and Maces at least #5100

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

WeaverThree
Copy link
Contributor

PartsStore's generator for miscellaneous EquipmentParts was not using new instances of the part everywhere it needed to. In particular this was causing this to happen:

  1. New Hatchet A is generated with Omnipod turned off.
  2. Hatchet A is placed in parts list.
  3. New Hatchet B is generated with OmniPod turned on.
  4. Hatchet B is placed in parts list.
  5. Hatchet B is used to generate an empty OmniPod.
  6. Empty OmniPod constructor turns off OmniPoddedness on Hatchet B, which propagates back to the one in the parts list.

Which results in two copies of each non-OmniPodded hatchet in the parts store, effectively:

2024-10-21_080558

My change adds a Hatchet C used to create the OmniPod, which fixes this:

2024-10-21_080430

The same is true for at least Maces if not other misc-type EquipmentParts

@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.43%. Comparing base (a339462) to head (c0adb0c).
Report is 157 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5100   +/-   ##
=========================================
  Coverage     10.42%   10.43%           
- Complexity     6028     6036    +8     
=========================================
  Files           953      953           
  Lines        134113   134123   +10     
  Branches      19435    19437    +2     
=========================================
+ Hits          13979    13991   +12     
- Misses       118785   118787    +2     
+ Partials       1349     1345    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HammerGS HammerGS merged commit f448dd7 into MegaMek:master Oct 21, 2024
4 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.

4 participants