public void setBAGrabBars() { if (isOmni()) { return; } // TODO: I really hate this optional rule - what if some units are // already loaded? // if ba_grab_bars is on, then we need to add battlearmor handles, // otherwise clamp mounts // but first clear out whatever we have Vector<Transporter> et = new Vector<Transporter>(getTransports()); for (Transporter t : et) { if (t instanceof BattleArmorHandlesTank) { removeTransporter(t); } } if (game.getOptions().booleanOption(OptionsConstants.ADVANCED_BA_GRAB_BARS)) { addTransporter(new BattleArmorHandlesTank()); } else { addTransporter(new ClampMountTank()); } }
public double getTankWeightDualTurret() { double weight = 0; // For omni vees, the base chassis sets a turret weight if (tank.isOmni() && tank.getBaseChassisTurret2Weight() >= 0) { weight = tank.getBaseChassisTurret2Weight(); } else { // For non-omnis, count up the weight of eq in the turret for (Mounted m : tank.getEquipment()) { if ((m.getLocation() == tank.getLocTurret2()) && !(m.getType() instanceof AmmoType)) { weight += m.getType().getTonnage(tank); } } // Turrets weight 10% of the weight of weapons in them weight = weight / 10.0f; } return TestEntity.ceilMaxHalf(weight, getWeightCeilingTurret()); }
Justification.CENTER, Justification.CENTER, Justification.CENTER, Justification.CENTER })); addFluff(); setModelData("isOmni", tank.isOmni()); setModelData("isVTOL", tank.hasETypeFlag(Entity.ETYPE_VTOL)); setModelData("isSuperheavy", tank.isSuperHeavy()); if (tank.isOmni()) { addFixedOmni(tank); continue; if (tank.isOmni() && !tank.isPodMountedTransport(t)) { ((List<Map<String, Object>>) getModelData("fixedEquipment")).add(row); setModelData("fixedTonnage", ((double) getModelData("fixedTonnage")) + (double) row.get("tonnage"));
public double getTankWeightTurret() { double weight = 0; // For omni vees, the base chassis sets a turret weight if (tank.isOmni() && tank.getBaseChassisTurretWeight() >= 0) { weight = tank.getBaseChassisTurretWeight(); } else { // For non-omnis, count up the weight of eq in the turret for (Mounted m : tank.getEquipment()) { if ((m.getLocation() == tank.getLocTurret()) && !(m.getType() instanceof AmmoType)) { weight += m.getType().getTonnage(tank); } } // Turrets weight 10% of the weight of weapons in them weight = weight / 10.0f; } if (tank.isSupportVehicle()) { if (getEntity().getWeight() < 5) { return TestEntity.ceil(weight, Ceil.KILO); } else { return TestEntity.ceil(weight, Ceil.HALFTON); } } else { return TestEntity.ceilMaxHalf(weight, getWeightCeilingTurret()); } }
if (tank.isOmni()) {
addTransportBays(tank); final TestSupportVehicle testTank = new TestSupportVehicle(tank, verifier.tankOption, null); setModelData("isOmni", tank.isOmni()); setModelData("isVTOL", tank.hasETypeFlag(Entity.ETYPE_VTOL)); setModelData("isSuperheavy", tank.isSuperHeavy()); setModelData("fuelRange", ""); // We do not yet record the data to compute range from tonnage. setModelData("fuelMass", adjustWeight(tank.getFuelTonnage())); if (tank.isOmni()) { addFixedOmni(tank);
cost += costs[x]; if (isOmni()) { // Omni conversion cost goes here. cost *= 1.25; costs[i++] = -1.25;