def _generateTankman(vehicleDescr, roles, level): nationID, vehicleTypeID = vehicleDescr.type.id passport = (nationID, False, False, 0, 0, 0) skills = () return tankmen.stripNonBattle( tankmen.generateCompactDescr(passport, vehicleTypeID, roles[0], level, skills, level))
def _generateTankman(vehicleDescr, roles, level): nationID, vehicleTypeID = vehicleDescr.type.id passport = (nationID, False, False, 0, 0, 0) skills = () return tankmen.stripNonBattle(tankmen.generateCompactDescr(passport, vehicleTypeID, roles[0], level, skills, level))
def generateDefaultCrew(vehicleType, level): nationID, vehicleTypeID = vehicleType.id skills = () passport = (nationID, False, False, 0, 0, 0) res = [] for roles in vehicleType.crewRoles: cd = tankmen.generateCompactDescr(passport, vehicleTypeID, roles[0], level, skills, level) res.append(tankmen.stripNonBattle(cd)) return tuple(res)
def generateDefaultCrew(vehicleType, level): raise 0 <= level <= tankmen.MAX_SKILL_LEVEL or AssertionError nationID, vehicleTypeID = vehicleType.id skills = () passport = (nationID, False, False, 0, 0, 0) res = [] for roles in vehicleType.crewRoles: cd = tankmen.generateCompactDescr(passport, vehicleTypeID, roles[0], level, skills, level) res.append(tankmen.stripNonBattle(cd)) return tuple(res)