Package megamek.common.containers
Class MunitionTree
java.lang.Object
megamek.common.containers.MunitionTree
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionMunitionTree(String fName) Constructor for reading in files containing load out imperatives. -
Method Summary
Modifier and TypeMethodDescriptionintReturn the actual, or effective, desired count of ammo bins for the given binType and ammoTypegetCountsOfAmmunitionForKey(String chassis, String variant, String pilot, String binType) getEffectiveImperative(String chassis, String variant, String pilot, String binType) Deprecated, for removal: This API element is subject to removal in a future version.getPriorityList(String chassis, String variant, String pilot, String binType) voidvoidvoidinsertMangledImperatives(String chassis, String variant, String pilot, HashMap<String, String> imperatives) Deprecated, for removal: This API element is subject to removal in a future version.voidloadEntityList(List<Entity> el) Convert List of Entities into a set of specific imperatives for each unit.voidvoidwriteToADFFilename(String fName) void
-
Field Details
-
LRM_MUNITION_NAMES
-
SRM_MUNITION_NAMES
-
AC_MUNITION_NAMES
-
ATM_MUNITION_NAMES
-
iATM_MUNITION_NAMES
-
ARROW_MUNITION_NAMES
-
ARTILLERY_MUNITION_NAMES
-
ARTILLERY_CANNON_MUNITION_NAMES
-
MORTAR_MUNITION_NAMES
-
NARC_MUNITION_NAMES
-
BOMB_MUNITION_NAMES
-
-
Constructor Details
-
MunitionTree
public MunitionTree() -
MunitionTree
-
MunitionTree
Constructor for reading in files containing load out imperatives.- Parameters:
fName- file name- Throws:
IllegalArgumentException
-
-
Method Details
-
readFromADF
- Throws:
IOException
-
writeToADFFilename
-
writeToADFFormat
- Throws:
IOException
-
loadEntityList
Convert List of Entities into a set of specific imperatives for each unit. Used for backing up original load out.- Parameters:
el-Entitylist
-
insertImperative
public void insertImperative(String chassis, String variant, String pilot, String binType, String... ammoTypes) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
insertImperatives
-
insertMangledImperatives
@Deprecated(since="0.51.0", forRemoval=true) public void insertMangledImperatives(String chassis, String variant, String pilot, HashMap<String, String> imperatives) Deprecated, for removal: This API element is subject to removal in a future version. -
getCountsOfAmmunitionForKey
-
getPriorityList
-
getEffectiveImperative
@Deprecated(since="0.51.0", forRemoval=true) public String getEffectiveImperative(String chassis, String variant, String pilot, String binType) Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- entire imperative string that would act on the provided key set
-
getCountOfAmmoForKey
public int getCountOfAmmoForKey(String chassis, String variant, String pilot, String binType, String ammoType) Return the actual, or effective, desired count of ammo bins for the given binType and ammoType- Returns:
- int count of bins requested for this binType:ammoType set.
-