Package megamek.common.weapons.handlers
Class WeaponOrderHandler
java.lang.Object
megamek.common.weapons.handlers.WeaponOrderHandler
This class loads the custom weapon orders lists from the mmconf/customWeaponOrder.xml files.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetWeaponOrder(String chassis, String model) Retrieves the custom weapon order Map for the given chassis/model.static voidSave customWeaponOrderMap to a file.static voidsetWeaponOrder(String chassis, String model, WeaponSortOrder type, Map<Integer, Integer> customWeaponOrder) Sets the custom weapon order for the given chassis and model.
-
Field Details
-
CUSTOM_WEAPON_ORDER_FILENAME
- See Also:
-
-
Constructor Details
-
WeaponOrderHandler
public WeaponOrderHandler()
-
-
Method Details
-
saveWeaponOrderFile
Save customWeaponOrderMap to a file.- Throws:
IOException
-
getWeaponOrder
Retrieves the custom weapon order Map for the given chassis/model.- Parameters:
chassis- The unit's chassis.model- The unit's model- Returns:
- A
Mapfor the custom weapon order for the given unit. If the unit is not in the list, a NULL value is returned.
-
setWeaponOrder
public static void setWeaponOrder(String chassis, String model, WeaponSortOrder type, Map<Integer, Integer> customWeaponOrder) Sets the custom weapon order for the given chassis and model.
-