Package megamek.common.templates
Class AeroTROView
java.lang.Object
megamek.common.templates.TROView
megamek.common.templates.AeroTROView
- Direct Known Subclasses:
CapitalShipTROView,SmallCraftDropshipTROView
Creates a TRO template model for aerospace and conventional fighters.
-
Nested Class Summary
Nested classes/interfaces inherited from class megamek.common.templates.TROView
TROView.FormatTableRowMethod, TROView.Justification -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAmmo()Adds ammo data used by large craftprotected voidaddCrewEntry(String stringKey, int count) Convenience method to add the number of crew in a category to a list, and choose the singular or plural form.protected intaddWeaponBays(String[][] arcSets) Adds the details for all weapon bays, including heat by bay and location and rows for each bay.protected StringgetArcAbbr(Mounted<?> m) Firing arc abbreviation, which may be different from mounting location for side arcs on small craft and dropshipsprotected StringgetTemplateFileName(boolean html) protected voidinitModel(EntityVerifier verifier) protected booleanTest for whether the mount should be included in the equipment inventory section.Methods inherited from class megamek.common.templates.TROView
addArmorStructureEntries, addBasicData, addEntityFluff, addEquipment, addEquipment, addFixedOmni, addMekVeeAeroFluff, addPatchworkATs, addTransportBays, createView, formatArmorType, formatArmorType, formatLocationTableEntry, formatSystemFluff, formatTransporter, getIncludeFluff, getModelData, getSystemName, processTemplate, setIncludeFluff, setModelData, showFixedSystem, stripNotes
-
Constructor Details
-
AeroTROView
-
-
Method Details
-
getTemplateFileName
- Overrides:
getTemplateFileNamein classTROView
-
initModel
-
addWeaponBays
Adds the details for all weapon bays, including heat by bay and location and rows for each bay.- Parameters:
arcSets- A two-dimensional array that groups arcs that should appear on the same line (e.g. left/right). Only the first arc in any group is actually evaluated, since the rules require left/right arcs be identical, but both arcs are combined in the name.- Returns:
- The width of the longest value for bay/weapon name, for use in laying out plain text.
-
getArcAbbr
Firing arc abbreviation, which may be different from mounting location for side arcs on small craft and dropships- Parameters:
m- The weapon mount- Returns:
- The arc abbreviation.
-
addAmmo
protected void addAmmo()Adds ammo data used by large craft -
addCrewEntry
Convenience method to add the number of crew in a category to a list, and choose the singular or plural form. The localized string property should be provided for both singular and plural entries, even if they are the same (such as enlisted/non-rated and bay personnel in English).The model needs to have a "crew" entry initialized to a
List<String>before calling this method.- Parameters:
stringKey- The key for the string property in the singular form. A "TROView." prefix will be added, and if the plural form is needed "s" will be appended.count- The number of crew in the category- Throws:
NullPointerException- If the "crew" property in the model has not been initializedClassCastException- If the crew property of the model is not aList<String>
-
skipMount
Description copied from class:TROViewTest for whether the mount should be included in the equipment inventory section.
-