Ejemplo n.º 1
0
 def __isHasDifferences(self, strCD, equipment, basketVehCrewLvl,
                        basketVehCrewSkills, selShellIndex, hasCamouflage,
                        battleBooster):
     if basketVehCrewLvl != self.getCurrentCrewSkillLevel():
         return True
     elif basketVehCrewSkills != self.getCurrentCrewSkills():
         return True
     elif not cmp_helpers.isEquipmentSame(
             equipment,
             self.__vehicle.equipment.regularConsumables.getIntCDs(
                 default=None)):
         return True
     elif selShellIndex != self.__selectedShellIndex:
         return True
     else:
         currVehHasCamouflage = cmp_helpers.isCamouflageSet(self.__vehicle)
         if hasCamouflage != currVehHasCamouflage:
             return True
         currVehBattleBooster = self.__vehicle.equipment.battleBoosterConsumables[
             0]
         if not battleBooster == currVehBattleBooster:
             return True
         if currVehHasCamouflage:
             targetVehicle = Vehicle(
                 self.__vehicle.descriptor.makeCompactDescr())
             cmp_helpers.removeVehicleCamouflages(targetVehicle)
         else:
             targetVehicle = self.__vehicle
         return True if strCD != targetVehicle.descriptor.makeCompactDescr(
         ) else False
 def __isHasDifferences(self, strCD, equipment, basketVehCrewLvl,
                        basketVehCrewSkills, selShellIndex, hasCamouflage,
                        battleBooster, dynSlotType, postProgressionState):
     if basketVehCrewLvl != self.getCurrentCrewSkillLevel():
         return True
     elif basketVehCrewSkills != self.getCurrentCrewSkills():
         return True
     elif not cmp_helpers.isEquipmentSame(
             equipment,
             self.__vehicle.consumables.installed.getIntCDs(default=None)):
         return True
     elif selShellIndex != self.__selectedShellIndex:
         return True
     currVehHasCamouflage = cmp_helpers.isCamouflageSet(self.__vehicle)
     if hasCamouflage != currVehHasCamouflage:
         return True
     currVehBattleBoosters = self.__vehicle.battleBoosters.installed
     if currVehBattleBoosters.getCapacity(
     ) > 0 and not battleBooster == currVehBattleBoosters[0]:
         return True
     if currVehHasCamouflage:
         targetVehicle = Vehicle(
             self.__vehicle.descriptor.makeCompactDescr())
         cmp_helpers.removeVehicleCamouflages(targetVehicle)
     else:
         targetVehicle = self.__vehicle
     if strCD != targetVehicle.descriptor.makeCompactDescr():
         return True
     elif dynSlotType != self.__vehicle.optDevices.dynSlotType:
         return True
     else:
         return True if postProgressionState != self.__vehicle.postProgression.getState(
             implicitCopy=False) else False
Ejemplo n.º 3
0
    def _getCurrentVehicleCopy(self):
        vehicle = Vehicle(
            strCompactDescr=self.__vehicle.descriptor.makeCompactDescr())
        vehicle.crew = self.__vehicle.crew[:]
        for i, equipmentIntCD in enumerate(
                self.__vehicle.consumables.installed.getIntCDs(default=None)):
            vehicle_adjusters.installEquipment(vehicle, equipmentIntCD, i)

        vehicle.descriptor.activeGunShotIndex = self.__vehicle.descriptor.activeGunShotIndex
        cmp_helpers.applyCamouflage(
            vehicle, cmp_helpers.isCamouflageSet(self.__vehicle))
        for battleBooster in self.__vehicle.battleBoosters.installed.getItems(
        ):
            vehicle_adjusters.installBattleBoosterOnVehicle(
                vehicle, battleBooster.intCD)

        return vehicle
Ejemplo n.º 4
0
 def isCamouflageSet(self):
     return cmp_helpers.isCamouflageSet(self.__vehicle)