Package megamek.common.units
Class PilotSPAHelper
java.lang.Object
megamek.common.units.PilotSPAHelper
This class contains helper methods for Special Pilot Abilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isSandblasterValid
(EquipmentType equipmentType, 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.static boolean
isSandblasterValid
(Mounted<?> mounted, 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.static boolean
isWeaponSpecialistValid
(EquipmentType equipmentType, GameOptions options) static boolean
isWeaponSpecialistValid
(Mounted<?> mounted, GameOptions options) sandblasterValidWeaponNames
(Entity entity, 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.sandblasterValidWeapons
(Entity entity, GameOptions options) Returns a List of weapons from those present on the given Entity that are valid choices for the Sandblaster SPA.weaponSpecialistValidWeaponNames
(Entity entity, 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.weaponSpecialistValidWeapons
(Entity entity, GameOptions options) Returns a List of weapons from those present on the given Entity that are valid choices for the Weapon Specialist SPA.
-
Method Details
-
isWeaponSpecialistValid
- 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. UnlikeweaponSpecialistValidWeaponNames(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
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. UnlikesandblasterValidWeaponNames(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
-