Class QuirkCatalog

java.lang.Object
megamek.common.options.QuirkCatalog

public final class QuirkCatalog extends Object
Catalog of every MegaMek quirk with its implementation status and rules reference, plus the book quirks MegaMek has no option for at all.

The status of a real quirk is not listed here. It is read from the quirk's own resource entries in common/options/messages.properties, which already carry .working, .rulesBook and .rulesPage next to the quirk's name and description. Keeping the data there means a quirk's status lives with the rest of its text, and adding a quirk to Quirks or WeaponQuirks needs no edit here.

QuirkPlaceholders are the exception: a quirk with no option has no resource entry to hang status on, so the small list of them is declared below. They have no IOption, so they never serialize into saved games or MUL files and never surface in MekHQ.

Source: docs/MegaMek_Quirks_Reference.xlsx, reconciled against the engine on 2026-08-01. When the audit is revised, update the .working resource values rather than adding data here.

  • Method Details

    • getEntry

      public static Optional<QuirkCatalogEntry> getEntry(QuirkKind kind, String code)
      Parameters:
      kind - whether to look among the chassis quirks or the weapon quirks. The two sets share some codes, so the kind is part of the lookup.
      code - the quirk's IOption name
      Returns:
      the catalog entry for that quirk, or empty when the resource bundle records no status for it
    • getPlaceholders

      public static List<QuirkPlaceholder> getPlaceholders(String groupKey)
      Parameters:
      groupKey - a quirk group key, either Quirks.POS_QUIRKS or Quirks.NEG_QUIRKS
      Returns:
      the book quirks MegaMek has no option for that belong in that group, sorted by display name. The quirks UI shows these as grayed-out placeholder rows.
    • getAllPlaceholders

      public static List<QuirkPlaceholder> getAllPlaceholders()
      Returns:
      every book quirk MegaMek has no option for, in no particular order
    • getEntries

      public static Collection<QuirkCatalogEntry> getEntries(QuirkKind kind)
      Parameters:
      kind - whether to list the chassis quirks or the weapon quirks
      Returns:
      every catalog entry of that kind, in no particular order