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

Armor allocation view #81

Merged
merged 14 commits into from Oct 2, 2017
Merged

Armor allocation view #81

merged 14 commits into from Oct 2, 2017

Conversation

neoancient
Copy link
Member

@neoancient neoancient commented Sep 21, 2017

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.

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
@neoancient neoancient changed the title Armor allocation Armor allocation view Sep 21, 2017
auto-allocation code for mechs.

Changed auto-allocation method to recalculate % of total armor after
assigning head location to get better distribution.
@neoancient
Copy link
Member Author

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.

@neoancient neoancient merged commit d04cdf0 into master Oct 2, 2017
@neoancient neoancient deleted the armor_allocation branch October 2, 2017 17:58
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.

None yet

1 participant