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

TRO style summary #1193

Merged
merged 69 commits into from Nov 18, 2018

Conversation

@neoancient
Copy link
Member

commented Nov 13, 2018

Uses Apache's FreeMarker template library to format unit stats in the official TRO format. The primary motivation for this was to make a more complete unit summary available for exporting unit designs from MML in plain text.

Each unit type has both an HTML and a plain text template. The HTML template is used to add an alternate unit display in the unit selector dialog:
image

I have also factored the fluff fields out of Entity and expanded them to include manufacturing data that can be included in the fluff header of the TRO display. A companion branch in MML adds a tab for editing fluff. It still has a couple things left to do, but the branch is available for looking at now. Here is an example of what the display looks like with the fluff filled in:
image

Other than finishing export feature in MML, future plans include adding support for assigning manufacturers and models for individual pieces of mounted equipment and an option to integrate it with factory data in MekHQ. With a template library in place a rework of the BV and cost summaries is also in order.

neoancient added 30 commits Sep 7, 2018
Reflects use of the file to define properties to the build file rather
than the settings file.
Streamlined armor/structure table calculations in model and template.
Mechs need to be able to show rear mounting, and vehicles show full name
in the official TROs instead of abbreviation, not having as many
columns. More changes to come with other unit types.
Added a way to determine whether to include fluff, defaults to true.
First step in splitting out TROView into separate classes based on unit
type.
Created individual classes for major unit types.
@NickAragua

This comment has been minimized.

Copy link
Member

commented Nov 14, 2018

Is there some set of steps I need to take to set up the freemarker library?

@neoancient

This comment has been minimized.

Copy link
Member Author

commented Nov 14, 2018

If you're using Eclipse it doesn't update automatically when the build file changes so you'll need to right click on the project and have Gradle refresh it. Then it will grab the library and reconfigure the class path to include it

public void setMech(Entity entity) {
MechView mechView = new MechView(entity, false);
setMech(entity,mechView);
// TROView troView = TROView.createView(entity, true);

This comment has been minimized.

Copy link
@sixlettervariables

sixlettervariables Nov 15, 2018

Member

This intended as a TODO?

This comment has been minimized.

Copy link
@neoancient

neoancient Nov 16, 2018

Author Member

Obsolete test code that I've now removed.

@@ -0,0 +1,290 @@
/*

This comment has been minimized.

Copy link
@sixlettervariables

sixlettervariables Nov 15, 2018

Member

Whitespace is a bit off in this file.

This comment has been minimized.

Copy link
@neoancient

neoancient Nov 16, 2018

Author Member

I forgot to change the editor settings when I set up a new workspace post-Gradle conversion. I missed this file when I fixed all the others with tabbed indents.

Copy link
Member

left a comment

Love the new view.

@neoancient neoancient merged commit 6253ce7 into master Nov 18, 2018
@neoancient neoancient deleted the tro_display branch Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.