Interface InventoryEntry

All Known Implementing Classes:
AR10InventoryEntry, IntrinsicPhysicalInventoryEntry, IntrinsicPhysicalInventoryEntry.HeaderEntry, StandardInventoryEntry, WeaponBayInventoryEntry

public interface InventoryEntry
Interface for classes that process entries in the weapons and inventory table
  • Field Details

  • Method Details

    • nRows

      int nRows()
      Returns:
      The number of rows this entry takes on the table. This does not consider text that is wrapped due to insufficient field width.
    • getUniqueId

      String getUniqueId()
    • getQuantityField

      String getQuantityField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The number of identical equipment pieces represented by this entry
    • getNameField

      String getNameField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The name of the equipment
    • isDamaged

      boolean isDamaged()
      Returns:
      If is damaged
    • getLocationField

      String getLocationField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The location/firing arc
    • getHeatField

      String getHeatField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The amount of heat generated
    • getDamageField

      String getDamageField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The damage caused by the weapon, as well as its type code
    • getMinField

      String getMinField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The upper limit of the minimum range
    • getShortField

      String getShortField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The upper limit of the short range (ground units) or SRV (aero units)
    • getMediumField

      String getMediumField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The upper limit of the medium range (ground units) or MRV (aero units)
    • getLongField

      String getLongField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The upper limit of the long range (ground units) or LRV (aero units)
    • getExtremeField

      String getExtremeField(int row)
      Parameters:
      row - The row index within the entry. Should be < nRows()
      Returns:
      The ERV (aero units)
    • getModField

      default String getModField(int row)
      Parameters:
      row - The row index within the entry
      Returns:
      The to-hit modifier of the item
    • getModField

      String getModField(int row, boolean baseOnly)
      Parameters:
      row - The row index within the entry
      Returns:
      The to-hit modifier of the item
    • indentMultiline

      boolean indentMultiline()
      Returns:
      Whether lines after the first line should be indented
    • hasQuirks

      boolean hasQuirks()
      Returns:
      Whether the entry has any quirks that need to be printed
    • getQuirksField

      String getQuirksField()
      Returns:
      The quirk text to print, if any
    • aeroAVMod

      default int aeroAVMod(megamek.common.equipment.Mounted<?> weapon)
      Computes any modification to the aerospace AV for linked Artemis, Apollo, or PPC capacitor
      Parameters:
      weapon - The weapon mount
      Returns:
      The AV modification, if any
    • aeroAVMod

      default int aeroAVMod(megamek.common.equipment.WeaponType weapon, megamek.common.equipment.EquipmentType linkedBy, boolean bay)
      Computes any modification to the aerospace AV for linked Artemis, Apollo, or PPC capacitor
      Parameters:
      weapon - The type of weapon
      linkedBy - The type of equipment the weapon is linked by
      bay - Whether the weapon is part of a weapon bay
      Returns:
      The AV modification, if any