return (float)Math.ceil(fTons / 5.0);
if (entity.getTechLevel() == TechConstants.T_CLAN_LEVEL_2) { return (float)Math.ceil(fTons / 5.0f); } else { return (float)Math.ceil(fTons / 4.0f); }
    public float getTonnage(Entity entity) {        if (tonnage != TONNAGE_VARIABLE) {            return tonnage;        }        // check for known formulas        if (hasFlag(F_JUMP_JET)) {            if (entity.getWeight() >= 55.0) {                return 0.5f;            } else if (entity.getWeight() >= 85.0) {                return 1.0f;            } else {                return 2.0f;            }        } else if (hasFlag(F_HATCHET)) {            return (float)Math.ceil(entity.getWeight() / 15.0);        } else if (hasFlag(F_MASC)) {            if (entity.getTechLevel() == TechConstants.T_CLAN_LEVEL_2) {                return (float)Math.round(entity.getWeight() / 25.0f);            }            else {                return (float)Math.round(entity.getWeight() / 20.0f);            }        } else if (hasFlag(F_TARGCOMP)) {            // 1 ton for every 5 tons of direct_fire weaponry            double fTons = 0.0;            for (Enumeration e = entity.getWeapons(); e.hasMoreElements(); ) {                Mounted m = (Mounted)e.nextElement();                WeaponType wt = (WeaponType)m.getType();                if (wt.hasFlag(WeaponType.F_DIRECT_FIRE)) {                    fTons += wt.getTonnage(entity);                }            }            return (float)Math.ceil(fTons / 5.0);        }                // okay, I'm out of ideas        return 1.0f;    }