Class AbstractKitCatalog

java.lang.Object
mekhq.campaign.personnel.quartermaster.AbstractKitCatalog
Direct Known Subclasses:
ArmorKitCatalog, EquipmentKitCatalog

public abstract class AbstractKitCatalog extends Object
Shared plumbing for the two kit catalogs, ArmorKitCatalog and EquipmentKitCatalog.

The two catalogs answer very different questions — armor kits are grouped by who wears them and gated by year, equipment kits by which skill they improve — so most of their logic is deliberately kept apart. What they share is the shape of the choices they feed the campaign-options dropdowns: a "no kit" sentinel first, then the kit internal names. That builder lives here; each subclass keeps its own domain logic (including its own canBeIssuedKit, which the two answer differently).

Since:
0.51.01
  • Constructor Details

    • AbstractKitCatalog

      protected AbstractKitCatalog()
  • Method Details

    • optionKitNames

      protected static List<String> optionKitNames(String sentinel, Collection<String> kitNames)
      Builds a default-kit dropdown's choices: the "no kit" sentinel first, then the given kit internal names in the order supplied.
      Parameters:
      sentinel - the value meaning "issue no kit" (coveralls for armor, the empty string for equipment)
      kitNames - the kit internal names to offer, already in display order
      Returns:
      the option values, sentinel first