-
Notifications
You must be signed in to change notification settings - Fork 293
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NickAragua
approved these changes
Oct 25, 2023
NickAragua
requested changes
Oct 31, 2023
|
||
try { | ||
loader.load(unit, checkElevation, bayNumber); | ||
}catch(IllegalArgumentException e){ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
NickAragua
approved these changes
Nov 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.