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

Fixing fuel tons per burn day display for Jumpships #4853

Merged
merged 5 commits into from
Nov 12, 2023

Conversation

nutritiousemployee
Copy link
Contributor

@nutritiousemployee nutritiousemployee commented Oct 25, 2023

This is a fix for MekHQ issue #3594

While the actual fuel usage and cost calculations were correct, the display of TBD for Jumpships got reduced to 10% of the actual value bringing in a discrepancy.
Removing that part of the code solves it - after some testing it appears to also fix the "Burn Days (Station-keeping)" value in MegaMekLab (since the same chunk of code was used there).
Example: Monolith JS has 39.52 TBD, and carries 68 tons of fuel, so it's station keeping burn days should be 1.72 and not 17.21 as it displays now.

Edited, since i can't seem to figure out how to undo my commits: this also now fixes MekHQ #3773

In GameManager the unit being loaded will go through a try-catch. If there's an issue with the loading, a message will be sent into the server chat.


try {
loader.load(unit, checkElevation, bayNumber);
}catch(IllegalArgumentException e){
Copy link
Member

Choose a reason for hiding this comment

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

Hate to be that guy, but can we put spaces between the curly braces and the catch statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@HammerGS HammerGS merged commit f93fad5 into MegaMek:master Nov 12, 2023
4 checks passed
HammerGS added a commit that referenced this pull request Nov 12, 2023
Fixing fuel tons per burn day display for Jumpships #4853

Fix Partial Wings on OmniMechs #4881

add client setting for auto centering #4877

done and skip buttons handle changes in GUI Scale better #4875
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.

3 participants