Esempio n. 1
0
 def __setVehicleData(self, vehicleDescr = None):
     if vehicleDescr is not None:
         vehicleType = vehicleDescr.type
         self.compactDescr = vehicleType.compactDescr
         tags = vehicleType.tags
         self.classTag = _getClassTag(tags)
         self.isObserver = _isObserver(tags)
         self.shortName = vehicleType.shortUserString
         self.name = Vehicle.getUserName(vehicleType=vehicleType, textPrefix=True)
         self.shortNameWithPrefix = Vehicle.getShortUserName(vehicleType=vehicleType, textPrefix=True)
         self.guiName = getShortUserName(vehicleType)
         self.nationID = vehicleType.id[0]
         self.level = vehicleType.level
         vName = vehicleType.name
         self.iconPath = settings.makeContourIconSFPath(vName)
         if not fo_precache.add(settings.makeContourIconResPath(vName)):
             self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
     else:
         self.compactDescr = 0
         self.classTag = None
         self.isObserver = False
         self.shortName = settings.UNKNOWN_VEHICLE_NAME
         self.name = settings.UNKNOWN_VEHICLE_NAME
         self.guiName = settings.UNKNOWN_VEHICLE_NAME
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
         self.nationID = nations.NONE_INDEX
         self.level = settings.UNKNOWN_VEHICLE_LEVEL
         self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
     return
Esempio n. 2
0
 def __setVehicleData(self, vehicleDescr=None, maxHealth=None):
     if vehicleDescr is not None:
         vehicleType = vehicleDescr.type
         self.compactDescr = vehicleType.compactDescr
         self.strCompactDescr = vehicleDescr.makeCompactDescr()
         tags = vehicleType.tags
         self.tags = tags
         self.classTag = Vehicle.getVehicleClassTag(tags)
         self.isObserver = isObserver(tags)
         self.isPremiumIGR = isPremiumIGR(tags)
         self.turretYawLimits = vehicle_getter.getYawLimits(vehicleDescr)
         self.isDualGunVehicle = vehicleDescr.isDualgunVehicle
         self.chassisType = vehicleDescr.chassis.chassisType
         self.shortName = vehicleType.shortUserString
         self.name = Vehicle.getUserName(vehicleType=vehicleType,
                                         textPrefix=True)
         self.shortNameWithPrefix = Vehicle.getShortUserName(
             vehicleType=vehicleType, textPrefix=True)
         self.guiName = Vehicle.getShortUserName(vehicleType)
         self.nationID = vehicleType.id[0]
         self.level = vehicleType.level
         self.maxHealth = maxHealth
         self.isOnlyForBattleRoyaleBattles = isBattleRoyaleTank(tags)
         vName = vehicleType.name
         self.iconName = settings.makeVehicleIconName(vName)
         self.iconPath = settings.makeContourIconSFPath(vName)
     else:
         vehicleName = i18n.makeString(settings.UNKNOWN_VEHICLE_NAME)
         self.tags = frozenset()
         self.compactDescr = 0
         self.strCompactDescr = ''
         self.classTag = None
         self.isObserver = False
         self.isPremiumIGR = False
         self.turretYawLimits = None
         self.shortName = vehicleName
         self.isDualGunVehicle = False
         self.chassisType = 0
         self.name = vehicleName
         self.guiName = vehicleName
         self.shortNameWithPrefix = vehicleName
         self.nationID = nations.NONE_INDEX
         self.level = settings.UNKNOWN_VEHICLE_LEVEL
         self.iconName = settings.UNKNOWN_CONTOUR_ICON_NAME
         self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
         self.shortNameWithPrefix = vehicleName
         self.maxHealth = None
         self.isOnlyForBattleRoyaleBattles = False
     return
Esempio n. 3
0
 def __setVehicleData(self, vehicleDescr=None):
     if vehicleDescr is not None:
         vehicleType = vehicleDescr.type
         self.compactDescr = vehicleType.compactDescr
         tags = vehicleType.tags
         self.classTag = getClassTag(tags)
         self.isObserver = isObserver(tags)
         self.isPremiumIGR = isPremiumIGR(tags)
         self.turretYawLimits = vehicle_getter.getYawLimits(vehicleDescr)
         self.shortName = vehicleType.shortUserString
         self.name = Vehicle.getUserName(vehicleType=vehicleType,
                                         textPrefix=True)
         self.shortNameWithPrefix = Vehicle.getShortUserName(
             vehicleType=vehicleType, textPrefix=True)
         self.guiName = getShortUserName(vehicleType)
         self.nationID = vehicleType.id[0]
         self.level = vehicleType.level
         self.maxHealth = vehicleDescr.maxHealth
         vName = vehicleType.name
         self.iconName = settings.makeVehicleIconName(vName)
         self.iconPath = settings.makeContourIconSFPath(vName)
         if not settings.addContourIconToCache(vName):
             self.iconName = settings.UNKNOWN_CONTOUR_ICON_NAME
             self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
     else:
         self.compactDescr = 0
         self.classTag = None
         self.isObserver = False
         self.isPremiumIGR = False
         self.turretYawLimits = None
         self.shortName = settings.UNKNOWN_VEHICLE_NAME
         self.name = settings.UNKNOWN_VEHICLE_NAME
         self.guiName = settings.UNKNOWN_VEHICLE_NAME
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
         self.nationID = nations.NONE_INDEX
         self.level = settings.UNKNOWN_VEHICLE_LEVEL
         self.iconName = settings.UNKNOWN_CONTOUR_ICON_NAME
         self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
         self.maxHealth = None
     return
Esempio n. 4
0
 def __setVehicleData(self, vehicleDescr = None):
     if vehicleDescr is not None:
         vehicleType = vehicleDescr.type
         self.compactDescr = vehicleType.compactDescr
         tags = vehicleType.tags
         self.classTag = getClassTag(tags)
         self.isObserver = isObserver(tags)
         self.isPremiumIGR = isPremiumIGR(tags)
         self.turretYawLimits = vehicle_getter.getYawLimits(vehicleDescr)
         self.shortName = vehicleType.shortUserString
         self.name = Vehicle.getUserName(vehicleType=vehicleType, textPrefix=True)
         self.shortNameWithPrefix = Vehicle.getShortUserName(vehicleType=vehicleType, textPrefix=True)
         self.guiName = getShortUserName(vehicleType)
         self.nationID = vehicleType.id[0]
         self.level = vehicleType.level
         self.maxHealth = vehicleDescr.maxHealth
         vName = vehicleType.name
         self.iconName = settings.makeVehicleIconName(vName)
         self.iconPath = settings.makeContourIconSFPath(vName)
         if not settings.addContourIconToCache(vName):
             self.iconName = settings.UNKNOWN_CONTOUR_ICON_NAME
             self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
     else:
         self.compactDescr = 0
         self.classTag = None
         self.isObserver = False
         self.isPremiumIGR = False
         self.turretYawLimits = None
         self.shortName = settings.UNKNOWN_VEHICLE_NAME
         self.name = settings.UNKNOWN_VEHICLE_NAME
         self.guiName = settings.UNKNOWN_VEHICLE_NAME
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
         self.nationID = nations.NONE_INDEX
         self.level = settings.UNKNOWN_VEHICLE_LEVEL
         self.iconName = settings.UNKNOWN_CONTOUR_ICON_NAME
         self.iconPath = settings.UNKNOWN_CONTOUR_ICON_SF_PATH
         self.shortNameWithPrefix = settings.UNKNOWN_VEHICLE_NAME
         self.maxHealth = None
     return