Class MekTROView

java.lang.Object
megamek.common.templates.TROView
megamek.common.templates.MekTROView

public class MekTROView extends TROView
Creates a TRO template model for BattleMeks, OmniMeks, and IndustrialMeks of all leg configurations.
  • Constructor Details

    • MekTROView

      public MekTROView(Mek mek)
  • Method Details

    • getTemplateFileName

      protected String getTemplateFileName(boolean html)
      Overrides:
      getTemplateFileName in class TROView
    • initModel

      protected void initModel(EntityVerifier verifier)
      Overrides:
      initModel in class TROView
    • addFluff

      protected void addFluff()
    • showFixedSystem

      protected boolean showFixedSystem(Entity entity, int index, int loc)
      Description copied from class: TROView
      Used to determine whether system crits should be shown when detailing fixed equipment in an omni unit. By default, this is false, but meks override it to show some systems.
      Overrides:
      showFixedSystem in class TROView
      Parameters:
      entity - The unit the TRO is for
      index - The system index of the critical slot
      loc - The slot location
      Returns:
      Whether to show this as a fixed system in an omni configuration
    • getSystemName

      protected String getSystemName(Entity entity, int index)
      Description copied from class: TROView
      Used to show the name of fixed system critical slots in an omni unit. This is only used for Meks, and returns a default value of "Unknown System" for other units.
      Overrides:
      getSystemName in class TROView
      Parameters:
      entity - The unit the TRO is for
      index - The system index of the critical slot
      Returns:
      The name of the system to display in the fixed equipment table
    • formatLocationTableEntry

      protected String formatLocationTableEntry(Entity entity, Mounted<?> mounted)
      Description copied from class: TROView
      Formats displayable location name for use in equipment table. The format of the name can vary by unit type due to available space based on number of columns, and in some cases the official TROs have different location names than the ones used by MM.
      Overrides:
      formatLocationTableEntry in class TROView
      Parameters:
      entity - The entity the TRO is created for
      mounted - The mounted equipment
      Returns:
      The location name to use in the table.
    • skipMount

      protected boolean skipMount(Mounted<?> mount, boolean includeAmmo)
      Description copied from class: TROView
      Test for whether the mount should be included in the equipment inventory section.
      Overrides:
      skipMount in class TROView
      Parameters:
      mount - The equipment mount
      includeAmmo - Whether to include ammo in the list
      Returns:
      Whether to list the equipment in the inventory section