Example #1
0
 def __init__(self, vehicle):
     super(VehicleParams, self).__init__(vehicle.getCustomizedDescriptor())
     self.__factors = functions.getVehicleFactors(vehicle)
     self.__coefficients = g_paramsCache.getSimplifiedCoefficients()
     self.__compatibleBonuses = g_paramsCache.getCompatibleBonuses(vehicle.descriptor)
     self.__penalties = self.__getPenalties(vehicle)
     self.__bonuses = self.__getBonuses(vehicle)
Example #2
0
 def setVehicleAttrs(self, vehicleID, attrs):
     if not self.isSelectionStarted() or self.__playerVehicleID != vehicleID:
         return
     newFactors = getVehicleFactors(self.__vehicle)
     newFactors[_EXT_RESPAWN_BOOST] = self.__extData[_EXT_RESPAWN_BOOST]
     newAttrs = dict(attrs)
     newAttrs['circularVisionRadius'] = getCircularVisionRadius(self.__vehicle.descriptor, newFactors)
     self.__sessionProvider.shared.feedback.setVehicleAttrs(self.__playerVehicleID, newAttrs)
Example #3
0
 def __init__(self, vehicle):
     super(VehicleParams, self).__init__(vehicle.getCustomizedDescriptor())
     self.__factors = functions.getVehicleFactors(vehicle)
     self.__coefficients = g_paramsCache.getSimplifiedCoefficients()
     self.__compatibleBonuses = g_paramsCache.getCompatibleBonuses(
         vehicle.descriptor)
     self.__penalties = self.__getPenalties(vehicle)
     self.__bonuses = self.__getBonuses(vehicle)
Example #4
0
 def __updateGuiVehicle(self):
     invData, extData = self.__invData.copy(), self.__extData.copy()
     vehicle = self.__vehicle = Vehicle(strCompactDescr=self.__vehicle.strCD, extData=extData, invData=invData)
     vehicle.installPostProgressionItem(self.__itemsFactory.createVehPostProgression(vehicle.compactDescr, self.__extData[EXT_DATA_PROGRESSION_KEY], vehicle.typeDescr))
     vehicle.setPerksController(self.__perksController)
     vehicle.descriptor.onSiegeStateChanged(self.__extData[_EXT_SIEGE_STATE_KEY])
     vehicle.descriptor.installModifications(self.__extData[_EXT_PROGRESSION_MODS], rebuildAttrs=False)
     vehicle.descriptor.installEnhancements(self.__extData[_EXT_ENHANCEMENTS_KEY], rebuildAttrs=False)
     vehicle.descriptor.installOptDevsSequence(vehicle.optDevices.installed.getIntCDs())
     newFactors = getVehicleFactors(vehicle)
     newFactors[_EXT_RESPAWN_BOOST] = self.__extData[_EXT_RESPAWN_BOOST]
     return newFactors
 def __init__(self, vehicle):
     super(VehicleParams, self).__init__(self._getVehicleDescriptor(vehicle))
     self.__factors = functions.getVehicleFactors(vehicle)
     self.__kpi = functions.getKpiFactors(vehicle)
     self.__coefficients = g_paramsCache.getSimplifiedCoefficients()
     self.__vehicle = vehicle