Class PilotSPAHelper

java.lang.Object
megamek.common.units.PilotSPAHelper

public final class PilotSPAHelper extends Object
This class contains helper methods for Special Pilot Abilities.
  • Method Details

    • isWeaponSpecialistValid

      public static boolean isWeaponSpecialistValid(Mounted<?> mounted, @Nullable GameOptions options)
      Returns:
      True when the given Mounted equipment is a valid choice for the Weapons Specialist SPA.
    • isWeaponSpecialistValid

      public static boolean isWeaponSpecialistValid(EquipmentType equipmentType, @Nullable GameOptions options)
      Returns:
      True when the given EquipmentType is a valid choice for the Weapons Specialist SPA.
    • weaponSpecialistValidWeaponNames

      public static List<String> weaponSpecialistValidWeaponNames(Entity entity, @Nullable GameOptions options)
      Returns a List of distinct (each occurring only once) weapon names of weapons present on the given Entity that are valid choices for the Weapon Specialist SPA.
      Returns:
      A list of weapon names from the given Entity that are valid choices for the Weapon Specialist SPA
    • weaponSpecialistValidWeapons

      public static List<Mounted<?>> weaponSpecialistValidWeapons(Entity entity, @Nullable GameOptions options)
      Returns a List of weapons from those present on the given Entity that are valid choices for the Weapon Specialist SPA. Unlike weaponSpecialistValidWeaponNames(Entity, GameOptions), weapons appear in this list as often as they are present on the given Entity.
      Returns:
      A list of weapons from the given Entity that are valid choices for the Weapon Specialist SPA
    • isSandblasterValid

      public static boolean isSandblasterValid(Mounted<?> mounted, @Nullable GameOptions options)
      Returns true when the given Mounted equipment is a valid choice for the Sandblaster SPA, taking into account the given GameOptions, particularly, if TacOps RapidFire Autocannons is in use. When the given GameOptions is null, TacOps RapidFire Autocannons is assumed off. When TacOps RapidFire Autocannons is off, standard ACs are considered invalid.
      Returns:
      True when the given EquipmentType is a valid choice for the Sandblaster SPA.
    • isSandblasterValid

      public static boolean isSandblasterValid(EquipmentType equipmentType, @Nullable GameOptions options)
      Returns true when the given EquipmentType is a valid choice for the Sandblaster SPA, taking into account the given GameOptions, particularly, if TacOps RapidFire Autocannons is in use. When the given GameOptions is null, TacOps RapidFire Autocannons is assumed off. When TacOps RapidFire Autocannons is off, standard ACs are considered invalid.
      Returns:
      True when the given EquipmentType is a valid choice for the Sandblaster SPA.
    • sandblasterValidWeaponNames

      public static List<String> sandblasterValidWeaponNames(Entity entity, @Nullable GameOptions options)
      Returns a List of distinct (each occurring only once) weapon names of weapons present on the given Entity that are valid choices for the Sandblaster SPA.
      Returns:
      A list of weapon names from the given Entity that are valid choices for the Sandblaster SPA
    • sandblasterValidWeapons

      public static List<Mounted<?>> sandblasterValidWeapons(Entity entity, @Nullable GameOptions options)
      Returns a List of weapons from those present on the given Entity that are valid choices for the Sandblaster SPA. Unlike sandblasterValidWeaponNames(Entity, GameOptions), weapons appear in this list as often as they are present on the given Entity.
      Returns:
      A list of weapons from the given Entity that are valid choices for the Sandblaster SPA