Class RefitDesignSearch

java.lang.Object
mekhq.campaign.parts.RefitDesignSearch

public final class RefitDesignSearch extends Object
Finds the designs a unit can be refitted to with a refit kit: the same chassis and unit type, a matching weight, and allowed by the campaign's tech rules. It also counts the designs it passed over, so the player can be told why the list is empty.
  • Method Details

    • findDesigns

      public static RefitDesignSearch.Result findDesigns(megamek.common.units.Entity entity, Campaign campaign)
      Finds the designs this unit could be refitted to.
      Parameters:
      entity - the unit's current design
      campaign - the campaign, for its tech rules and date
      Returns:
      the designs found, with counts of those passed over