public int getBaMountLocation() { if(null != unit) { Mounted mounted = unit.getEntity().getEquipment(equipmentNum); if(null != mounted) { return mounted.getBaMountLoc(); } } return -1; }
public int getBaMountLocation() { if(null != unit) { Mounted mounted = unit.getEntity().getEquipment(equipmentNum); if(null != mounted) { return mounted.getBaMountLoc(); } } return -1; }
/** * Returns the <code>Mounted</code> for the manipulator * mounted in the left arm of this <code>BattleArmor</code> squad. * * @return */ public Mounted getLeftManipulator(){ for (Mounted m : getMisc()){ if (m.getType().hasFlag(MiscType.F_BA_MANIPULATOR) && (m.getBaMountLoc() == MOUNT_LOC_LARM)){ return m; } } return null; }
if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_LARM){ currentManip = ((BattleArmor)entity).getLeftManipulator(); } else if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_RARM){ currentManip = ((BattleArmor)entity).getRightManipulator(); } else { meacp = new MEAChoicePanel(entity, m.getBaMountLoc(), currentManip, manipTypes);
/** * Returns the <code>Mounted</code> for the manipulator * mounted in the right arm of this <code>BattleArmor</code> squad. * * @return */ public Mounted getRightManipulator(){ for (Mounted m : getMisc()){ if (m.getType().hasFlag(MiscType.F_BA_MANIPULATOR) && (m.getBaMountLoc() == MOUNT_LOC_RARM)){ return m; } } return null; }
for (Mounted m : ba.getEquipment()) { if (m.getType().hasFlag(MiscType.F_BA_MANIPULATOR)) { if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_LARM) { numLAManipulators++; laManipType = BAManipulator.getManipulator(m.getType().getInternalName()); } else if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_RARM) { numRAManipulators++; raManipType = BAManipulator.getManipulator(m.getType().getInternalName()); } else { if (m.getBaMountLoc() != BattleArmor.MOUNT_LOC_NONE) { buff.append(m.getName() + "mounted in " + BattleArmor.MOUNT_LOC_NAMES[m.getBaMountLoc()] + ", but manipulators must be mounted in arms!"); } else {
if (m.getBaMountLoc() != BattleArmor.MOUNT_LOC_NONE){ sDesc += " (" + BattleArmor.MOUNT_LOC_NAMES[m.getBaMountLoc()] + ')'; } else {
if (getBaMountLoc() == BattleArmor.MOUNT_LOC_BODY) { desc.append(" (Body)"); if (getBaMountLoc() == BattleArmor.MOUNT_LOC_LARM) { desc.append(" (Left arm)"); if (getBaMountLoc() == BattleArmor.MOUNT_LOC_RARM) { desc.append(" (Right arm)"); if (getBaMountLoc() == BattleArmor.MOUNT_LOC_TURRET) { desc.append(" (Turret)");
boolean foundMea = false; for (Mounted m : entity.getEquipment()){ if (m.getBaMountLoc() != meaMountLoc){ continue; int baMountLoc = mountedManip.getBaMountLoc(); mountedManip = entity.addEquipment(manipType, mountedManip.getLocation());
row.put("name", stripNotes(m.getName())); row.put("location", BattleArmor.getBaMountLocAbbr(m.getBaMountLoc())); if (name.length() >= nameWidth) { nameWidth = name.length() + 1; row.put("mass", m.getType().getTonnage(ba) * 1000); if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_TURRET) { row.put("location", "-"); modularEquipment.add(row);
if (m.getType().hasFlag(MiscType.F_BA_MEA)){ Mounted manipulator = null; if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_LARM){ manipulator = ba.getLeftManipulator(); } else if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_RARM){ manipulator = ba.getRightManipulator(); output.write("baMEAMountLoc=\"" + m.getBaMountLoc() + "\" "); if (manipulator != null){
private boolean isModular() { if(null == unit) { return false; } for (Mounted m : unit.getEntity().getMisc()){ if (m.getType() instanceof MiscType && m.getType().hasFlag(MiscType.F_BA_MEA) && type instanceof MiscType && type.hasFlag(MiscType.F_BA_MANIPULATOR) && this.getBaMountLocation()== m.getBaMountLoc()){ return true; } /*if (type instanceof InfantryWeapon && m.getType() instanceof MiscType && m.getType().hasFlag(MiscType.F_AP_MOUNT) && this.getBaMountLocation()== m.getBaMountLoc()){ return true; }*/ } return false; }
for (Mounted m : getWeaponList()) { if (!m.getType().hasFlag(WeaponType.F_INFANTRY) && (m.getBaMountLoc() == loc) && ((m.getLocation() == LOC_SQUAD) || (m.getLocation() == trooper))) { hasAntiMech = true;
private boolean isModular() { if(null == unit) { return false; } for (Mounted m : unit.getEntity().getEquipment()){ if (m.getType() instanceof MiscType && m.getType().hasFlag(MiscType.F_BA_MEA) && type instanceof MiscType && type.hasFlag(MiscType.F_BA_MANIPULATOR) && this.getBaMountLocation()== m.getBaMountLoc()){ return true; } //this is not quite right, they must be linked somehow /*if (type instanceof InfantryWeapon && m.getType() instanceof MiscType && m.getType().hasFlag(MiscType.F_AP_MOUNT) && this.getBaMountLocation()== m.getBaMountLoc()){ return true; }*/ } return false; }
&& (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_NONE)) { continue;
&& (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_NONE)) { continue;
new FormatTableRowMethod(new int[] { nameWidth, 8, 12, 8 }, new Justification[] { Justification.LEFT, Justification.CENTER, Justification.CENTER, Justification.CENTER })); if (ba.getEquipment().stream().anyMatch(m -> m.getBaMountLoc() == BattleArmor.MOUNT_LOC_TURRET)) { final Map<String, Object> modularMount = new HashMap<>(); modularMount.put("name", ba.hasModularTurretMount() ? Messages.getString("TROView.BAModularTurret")
public void getUnallocatedEquipment(Entity entity, Vector<Mounted> unallocated) { for (Mounted m : entity.getEquipment()) { if (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_NONE) {
if (m.getBaMountLoc() == loc && (m.getLocation() == trooper || m.getLocation() == BattleArmor.LOC_SQUAD)) { BattleArmor.MOUNT_LOC_TURRET : BattleArmor.MOUNT_LOC_BODY; for (Mounted m : ba.getEquipment()) { if (m.getBaMountLoc() == otherLoc && (m.getLocation() == trooper || m.getLocation() == BattleArmor.LOC_SQUAD)) {
&& (m.getBaMountLoc() == BattleArmor.MOUNT_LOC_NONE)) { continue;