-
Notifications
You must be signed in to change notification settings - Fork 291
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
Turn Details Overlay on Boardview #4513
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
megamek/src/megamek/client/ui/swing/boardview/AbstractBoardViewOverlay.java
Fixed
Show fixed
Hide fixed
pakfront
added
(RFE) Enhancement
Requests for Enhancement, new features or implementations
GUI
User Interface
In Development (Draft)
An additional way to mark something as a draft. Make it stand out more.
labels
Jun 14, 2023
megamek/src/megamek/client/ui/swing/boardview/AbstractBoardViewOverlay.java
Fixed
Show fixed
Hide fixed
megamek/src/megamek/client/ui/swing/boardview/AbstractBoardViewOverlay.java
Fixed
Show fixed
Hide fixed
megamek/src/megamek/client/ui/swing/boardview/AbstractBoardViewOverlay.java
Fixed
Show fixed
Hide fixed
pakfront
removed
the
In Development (Draft)
An additional way to mark something as a draft. Make it stand out more.
label
Jun 16, 2023
SJuliez
requested changes
Jun 16, 2023
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.
Few minor things.
I like the AbstractBoardOverlay and the EntityAttackLog classes. Both neat as well as the PR itself of course.
SJuliez
approved these changes
Jun 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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 displays an optional overlay on the board view that gives the specific Moves or Actions a unit will do when the turn is Done.
This is very helpful in understanding what will happen in a turn, and makes debugging turn behavior a bit easier.
In the Move overlay, any set of moves that require a PSR get a * appended to their entry. Any illegal moves, such as moves beyond MP limit, are greyed out. There are also unicode icons for some move actions.
This fixes #4486
I optimized and centralized the code to calculate and itemize the user displayed ToHits for this feature and AttackSprites. This fixes #4501.
An important change - in FiringDisplay I switched the order of adding attacks to Game and to the local Log so that the Game add is first. This fixes the issues where the ToHit mods displayed to the user were not calculated correctly when the attack was first added. This should have not break anything, it is more correct and when the ToHits are sent to the server, they go through another recalc pass that verifies the values.
There are cases where the display differs from the actual results. Without considerable and possibly disruptivework, these are unavoidable due to the way MegaMek works:
In Move phase, it will display the Moves in the order they are entered. This may not match the actual execution order.
Notably, it seems in the game all altitude changes are reordered to happen at the beginning of the turn on Done submit. This is not reflected in the Move list, So moves made after a number of alt changes may not have enough MP. This is true of the boardview movement sprite display also, so is a general issue.
in Firing phase, I put a chunk of work into getting the ToHit modifiers to display and update correctly, but the penalty for Spotting still is not applied to the user displayed ToHit. It is correctly calculated when the Turn is executed though.