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

Implemented Resupply Module #4518 - MekHQ not recognizing Cargo Mek's cargo capacity, relevant for Logistics Overhaul/Upgrade #5324

Closed
7 tasks done
OrbMonky opened this issue Dec 9, 2024 · 4 comments · May be fixed by #5339

Comments

@OrbMonky
Copy link

OrbMonky commented Dec 9, 2024

Prerequisites and Pre-Issue Checklist

  • I'm reporting the issue to the correct repository:

  • MegaMek

  • MegaMekLab

  • MekHQ

  • I've tested the issue against at least the latest MILESTONE version

  • I've asked on the MegaMek Discord about the error

  • I've reviewed the BattleTech rules and MekHQ documentation, and I've confirmed that something isn't working as intended.

  • I've searched the Github tracker and haven't found the issue listed

Severity *

Medium (Gameplay Limitation): Non-core functionality is impaired, providing a suboptimal but playable experience.

Brief Description *

Using two salvaged Daedalus 'meks, I was trying to get a convoy working, and got it set up and assigned. The issue presents in MekHQ - it does not recognize the meks as having any cargo capacity. It picks up 4.35 tons from an insulated cargo space on a Coolant Truck (Hover) and truncates to 4 tons, but does not pick up the combined 30 tons in the two stock Daedalus GTX2A 'Stevedore' meks. This is relevant for satisfying logistical requirements for the resupply feature.
image
image
image
image

Steps to Reproduce

No response

Operating System *

Windows 10

Java Version *

17

MekHQ Suite Version *

None

Custom MekHQ Version

Implemented Resupply Module #4518

Attach Files

No response

Final Checklist

  • I've checked to make sure that this issue has not already been filed
  • I'm reporting only one issue in this ticket for clarity and focus
@OrbMonky OrbMonky changed the title Implemented Resupply Module #4518 - MekHQ not recognizing Cargo Mek's cargo capacity, relevant for Logistics Overhall/Upgrade Implemented Resupply Module #4518 - MekHQ not recognizing Cargo Mek's cargo capacity, relevant for Logistics Overhaul/Upgrade Dec 9, 2024
@IllianiCBT
Copy link
Collaborator

So the issue here is that these aren't cargo bays, they're fixed values of 'cargo'. So it's not saying that the unit has x cargo capacity, it's saying that the unit has y cargo.

I suspect this is a legacy decision, but @HammerGS might be able to weigh in as to how best to handle this. Because quite rightfully, players are going to see this and mentally parse it as cargo capacity.

@OrbMonky
Copy link
Author

To put my two cents in; the unit obviously isn't carrying around a black box that is labelled 'cargo' - it seems that it could only function as a container that could be reasonably filled, used to transport, and then emptied. I think it definitely should count as cargo capacity for the purposes of Mekhq/stratcon if nothing else.

@IllianiCBT
Copy link
Collaborator

This issue is one of internals - I'm inclined to agree with you - but this value appears to be just stored as a String and not as a definitive Part we can directly interact with. Meaning any parsing would need to be String-based -- i.e. checking whether the String Cargo ( appears in the parts list (if it appears in that list at all, I'm making the assumption it does). String comparison is one of, if not the, weakest form of comparison because if the String ever changes we'd need to go in and fix any instance where it's being parsed.

Not to mention we'd need to parse every part on the unit to find the 'cargo' parts.

@IllianiCBT
Copy link
Collaborator

I went ahead and implemented String comparison. It's not idea, but I strongly agree that these units should correctly report their cargo capacity and short of introducing an entirely new Part type (and then making that backwards compatible) I'm failing to spy a better alternative.

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 a pull request may close this issue.

2 participants