Exemplo n.º 1
0
 def _validateVehiclesInfo(vInfos):
     if g_currentVehicle.isPresent():
         vehicle = g_currentVehicle.item
         vInfos = (unit_items.VehicleInfo(vehicle.invID, vehicle.intCD, vehicle.level),)
     elif vInfos is None:
         vInfos = (unit_items.VehicleInfo(),)
     return vInfos
Exemplo n.º 2
0
 def validateVehicles(self, vInfo, flags):
     if g_currentVehicle.isPresent():
         vehicle = g_currentVehicle.item
         vInfo = unit_items.VehicleInfo(vehicle.invID, vehicle.intCD,
                                        vehicle.level)
     elif vInfo is None:
         vInfo = unit_items.VehicleInfo()
     return super(SquadActionValidator, self).validateVehicles(vInfo, flags)
Exemplo n.º 3
0
 def _getVehiclesInfo(self):
     vInfos = super(SquadVehiclesValidator, self)._getVehiclesInfo()
     if not findFirst(lambda v: not v.isEmpty(), vInfos, False):
         if g_currentVehicle.isPresent():
             vehicle = g_currentVehicle.item
             vInfos = (unit_items.VehicleInfo(vehicle.invID, vehicle.intCD,
                                              vehicle.level), )
     return vInfos
 def _getVehiclesInfo(self):
     vInfos = super(SquadVehiclesValidator, self)._getVehiclesInfo()
     if not findFirst(lambda v: not v.isEmpty(), vInfos, False):
         if g_currentVehicle.isPresent():
             vehicle = g_currentVehicle.item
             vehClassIdx = VEHICLE_CLASS_INDICES[vehicle.type]
             vInfos = (unit_items.VehicleInfo(vehicle.invID, vehicle.intCD,
                                              vehicle.level, vehClassIdx), )
     return vInfos
Exemplo n.º 5
0
 def getVehiclesInfo(self, dbID=None, unitIdx=None):
     return (unit_items.VehicleInfo(), )