try { Mounted mount = t.addEquipment(etype, nLoc, rearMount); mount.setOmniPodMounted(omniMounted);
int useLoc = TestEntity.eqRequiresLocation(t, etype)? nLoc : Aero.LOC_FUSELAGE; Mounted mount = t.addEquipment(etype, useLoc, rearMount); mount.setOmniPodMounted(omniMounted);
BattleArmor.MOUNT_LOC_NONE, isArmored, isTurreted); m.setOmniPodMounted(isOmniPod); hSharedEquip.put(etype, m); } else if (((etype instanceof WeaponType) && ((WeaponType) etype).isSplitable()) || ((etype instanceof MiscType) && etype.hasFlag(MiscType.F_SPLITABLE))) { m.setOmniPodMounted(isOmniPod); mech.addEquipment(m, loc, rearMounted); } else {
public Mounted addEquipment(EquipmentType etype, int loc, boolean rearMounted, int baMountLoc, boolean isArmored, boolean isTurreted, boolean isSponsonTurreted, boolean isPintleTurreted, boolean isOmniPodded) throws LocationFullException { Mounted mounted = new Mounted(this, etype); mounted.setArmored(isArmored); mounted.setBaMountLoc(baMountLoc); mounted.setMechTurretMounted(isTurreted); mounted.setSponsonTurretMounted(isSponsonTurreted); mounted.setPintleTurretMounted(isPintleTurreted); mounted.setOmniPodMounted(isOmniPodded); addEquipment(mounted, loc, rearMounted); return mounted; }
public Mounted addEquipment(EquipmentType etype, EquipmentType etype2, int loc, boolean omniPod) throws LocationFullException { Mounted mounted = new Mounted(this, etype); Mounted mounted2 = new Mounted(this, etype2); mounted.setOmniPodMounted(omniPod); mounted2.setOmniPodMounted(omniPod); // check criticals for space if (getEmptyCriticals(loc) < 1) { throw new LocationFullException(mounted.getName() + " and " + mounted2.getName() + " do not fit in " + getLocationAbbr(loc) + " on " + getDisplayName() + "\n free criticals in location: " + getEmptyCriticals(loc) + ", criticals needed: " + 1); } super.addEquipment(mounted, loc, false); super.addEquipment(mounted2, loc, false); CriticalSlot cs = new CriticalSlot(mounted); cs.setMount2(mounted2); addCritical(loc, cs); return mounted; }
&& (AmmoType.getOneshotAmmo(mounted) != null)) { Mounted m = new Mounted(this, AmmoType.getOneshotAmmo(mounted)); m.setOmniPodMounted(mounted.isOmniPodMounted()); int shots = 1; m2.setOmniPodMounted(mounted.isOmniPodMounted()); m2.setShotsLeft(shots); m.setLinked(m2);
rearMounted, BattleArmor.MOUNT_LOC_NONE, false, turretMounted); mount.setOmniPodMounted(isOmniMounted); if ((etype instanceof WeaponType) && etype.hasFlag(WeaponType.F_VGL)) {