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
Armor allocation view #81
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
classes: ArmorLocationView deals with the number of points allocated to one location. ArmorAllocationView positions the location views and shows summary statistics. At this point there are combo boxes to set the armor type for the location if using patchwork armor, but they make the controls too wide and even moving the armor allocation to a separate panel wouldn't change the fact that it looks bad. Committing what's been done so far before changing it.
the user a persistent indicator of what armor is in which location.
tonnage for the location when using patchwork armor.
listener that is extended by a specialized listener for each unit type.
Conflicts: src/megameklab/com/ui/Infantry/tabs/StructureTab.java src/megameklab/com/ui/Mek/tabs/StructureTab.java
auto-allocation code for mechs. Changed auto-allocation method to recalculate % of total armor after assigning head location to get better distribution.
Auto-armor allocation done, with some fixes in mechs to spread better and vehicles to put the reduced rear armor in the rear of superheavies instead of the right rear. |
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 continues the work I started when I rewrote the structure tab to integrate the IO tech advancement data. Since the armor allocation section did not deal with tech advancement I left it for a separate change.
Instead of separate classes for each type of unit that allocates armor by location (mech, vehicle, fighter at this point), there is one class to manage the armor values for a single location and another that creates and positions the location panels and shows the summary data.
I have also removed the patchwork dialog and replaced it with a view below the allocation panel as a persistent indicator of what type of armor is installed in each location and an easier way to change the armor for a location. There are also fixes for the current armor weight in the summary panel and status bar.
One other thing I did was consolidate the listeners for the various individual structure tab subpanel into a set of more general listener interfaces.
I intend to hold this until after the next development snapshot. I also realized as I was preparing this that I forgot to add the auto-allocate button to the new armor view so this is not quite ready anyway.