Package megameklab.util
Class AeroUtil
java.lang.Object
megameklab.util.AeroUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidassignQuarters(megamek.common.units.Aero aero, int officer, int standard, int secondClass, int steerage) Adjusts the number of all types of crew quarters on an aerospace vessel.static voidautoAssignQuarters(megamek.common.units.Aero aero) Adjusts the number of quarters of each to match the crew and passenger needs.static booleanisAeroEquipment(megamek.common.equipment.EquipmentType eq, megamek.common.units.Aero unit) static booleanisAeroWeapon(megamek.common.equipment.EquipmentType eq, megamek.common.units.Aero unit) static voidmoveOrAddEquipmentOnFighter(megamek.common.units.AeroSpaceFighter aero, megamek.common.equipment.Mounted<?> mounted, int location) static voidremoveAllCriticalSlotsFromFighter(megamek.common.units.AeroSpaceFighter aero) Removes all critical slots for the given fighter, unallocating all equipment (i.e., placing it into Entity.LOC_NONE) with the exception of certain equipment that has a fixed location such as Ammo.static voidremoveClanCASE(megamek.common.units.AeroSpaceFighter aero) static voidsetQuarters(megamek.common.units.Aero aero, megamek.common.verifier.TestAero.Quarters quarters, int size) Adjusts the number of crew quarters of a given type on an aerospace vessel.static voidupdateLoadedAero(megamek.common.units.Aero unit)
-
Method Details
-
isAeroWeapon
public static boolean isAeroWeapon(megamek.common.equipment.EquipmentType eq, megamek.common.units.Aero unit) -
isAeroEquipment
public static boolean isAeroEquipment(megamek.common.equipment.EquipmentType eq, megamek.common.units.Aero unit) -
setQuarters
public static void setQuarters(megamek.common.units.Aero aero, megamek.common.verifier.TestAero.Quarters quarters, int size) Adjusts the number of crew quarters of a given type on an aerospace vessel.- Parameters:
aero- The aerospace unit to change crew quarters sizes forquarters- The type of crew quarters to changesize- The number of personnel that can be housed in the designated type of quarters
-
assignQuarters
public static void assignQuarters(megamek.common.units.Aero aero, int officer, int standard, int secondClass, int steerage) Adjusts the number of all types of crew quarters on an aerospace vessel.- Parameters:
aero- The vesselofficer- The number of officer/first class quartersstandard- The number of standard crew quarterssecondClass- The number second class passenger quarterssteerage- The number of steerage class crew/passenger quarters
-
autoAssignQuarters
public static void autoAssignQuarters(megamek.common.units.Aero aero) Adjusts the number of quarters of each to match the crew and passenger needs. If no quarters are already assigned, this will put all officers in officer/first class cabins, enlisted crew in standard crew quarters, and passengers in second class cabins. If there are already more officer/first class cabins assigned than there are officers, the extra will be used as first class passenger cabins. Any steerage quarters will be assigned first to marines, then to passengers, then to remaining enlisted.- Parameters:
aero- The vessel to assign quarters for.
-
updateLoadedAero
public static void updateLoadedAero(megamek.common.units.Aero unit) -
moveOrAddEquipmentOnFighter
public static void moveOrAddEquipmentOnFighter(megamek.common.units.AeroSpaceFighter aero, megamek.common.equipment.Mounted<?> mounted, int location) throws megamek.common.exceptions.LocationFullException - Throws:
megamek.common.exceptions.LocationFullException
-
removeClanCASE
public static void removeClanCASE(megamek.common.units.AeroSpaceFighter aero) -
removeAllCriticalSlotsFromFighter
public static void removeAllCriticalSlotsFromFighter(megamek.common.units.AeroSpaceFighter aero) Removes all critical slots for the given fighter, unallocating all equipment (i.e., placing it into Entity.LOC_NONE) with the exception of certain equipment that has a fixed location such as Ammo.
-