Package megamek.common.loaders
Class BLKFile
java.lang.Object
megamek.common.loaders.BLKFile
- Direct Known Subclasses:
BLKAeroSpaceFighterFile,BLKBattleArmorFile,BLKConvFighterFile,BLKDropshipFile,BLKFixedWingSupportFile,BLKGunEmplacementFile,BLKHandheldWeaponFile,BLKInfantryFile,BLKJumpshipFile,BLKLargeSupportTankFile,BLKMekFile,BLKProtoMekFile,BLKSmallCraftFile,BLKSpaceStationFile,BLKStructureFile,BLKSupportTankFile,BLKSupportVTOLFile,BLKTankFile,BLKVTOLFile,BLKWarshipFile
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass that holds data relating to transport bays and functionality to parse .blk file transport bay entries -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidintdefaultAeroVGLFacing(int location, boolean rearFacing) protected intdefaultVGLFacing(int location, boolean rear) If a vehicular grenade launcher does not have a facing provided, assign a default facing.static voidstatic voidstatic BuildingBlockprotected EquipmentTypegetEquipmentType(Entity entity, String equipmentName) booleanisMine()protected voidloadEquipment(Entity t, String sName, int nLoc) protected voidloadInvalidSourceBuildReasons(Entity entity) protected voidloadQuirks(Entity entity) protected voidLoads slotless equipment (equipment at LOC_NONE) such as cockpit modifications.protected voidloadSVArmor(Entity sv) protected voidprotected voidsetArmorTechLevelFromDataFile(Entity entity) Sets the armor tech level for the entity based on the data file.protected voidsetBasicEntityData(Entity entity) voidvoid
-
Field Details
-
UNIT_FILE_UUID
- See Also:
-
FUSION
public static final int FUSION- See Also:
-
ICE
public static final int ICE- See Also:
-
XL
public static final int XL- See Also:
-
XXL
public static final int XXL- See Also:
-
LIGHT
public static final int LIGHT- See Also:
-
COMPACT
public static final int COMPACT- See Also:
-
FUELCELL
public static final int FUELCELL- See Also:
-
FISSION
public static final int FISSION- See Also:
-
NONE
public static final int NONE- See Also:
-
MAGLEV
public static final int MAGLEV- See Also:
-
STEAM
public static final int STEAM- See Also:
-
BATTERY
public static final int BATTERY- See Also:
-
SOLAR
public static final int SOLAR- See Also:
-
EXTERNAL
public static final int EXTERNAL- See Also:
-
-
Constructor Details
-
BLKFile
public BLKFile()
-
-
Method Details
-
defaultVGLFacing
protected int defaultVGLFacing(int location, boolean rear) If a vehicular grenade launcher does not have a facing provided, assign a default facing. The vehicle location determines this. For ProtoMeks the only legal location is the torso, but it may be mounted rear-facing.- Parameters:
location- The location where the VGL is mounted.rear- Whether the VGL is rear-facing.- Returns:
- The facing to assign to the VGL.
-
setBasicEntityData
- Throws:
EntityLoadingException
-
loadInvalidSourceBuildReasons
-
loadQuirks
- Throws:
EntityLoadingException
-
defaultAeroVGLFacing
public int defaultAeroVGLFacing(int location, boolean rearFacing) -
getEquipmentType
-
loadEquipment
- Throws:
EntityLoadingException
-
loadSlotlessEquipment
Loads slotless equipment (equipment at LOC_NONE) such as cockpit modifications. This equipment has no location but still needs to be saved and loaded.- Parameters:
t- the entity to load equipment into- Throws:
EntityLoadingException- if the equipment cannot be loaded
-
loadSVArmor
- Throws:
EntityLoadingException
-
isMine
public boolean isMine() -
setFluff
-
checkManualBV
-
setTechLevel
- Throws:
EntityLoadingException
-
getBlock
- Throws:
EntitySavingException
-
encode
- Throws:
EntitySavingException
-
encode
- Throws:
EntitySavingException
-
addTransports
- Throws:
EntityLoadingException
-
setArmorTechLevelFromDataFile
Sets the armor tech level for the entity based on the data file. The file should have "armor_tech_level", but it was changed from "armor_tech". And if this isn't found for some reason, it'll fall back and use the entity's tech base to determine this.- Parameters:
entity- entity that should have its armor tech level set based on the data file
-
resetCrew
-