Пример #1
0
 def wrapper(*args, **kwargs):
     res = yield functions.checkAmmoLevel((g_currentVehicle.item,))
     if res:
         func(*args, **kwargs)
     elif kwargs.get('callback') is not None:
         kwargs.get('callback')(False)
     return
Пример #2
0
 def wrapper(*args, **kwargs):
     res = yield checkAmmoLevel(getFalloutCtrl().getSelectedVehicles())
     if res:
         func(*args, **kwargs)
     elif kwargs.get('callback') is not None:
         kwargs.get('callback')(False)
     return
 def wrapper(*args, **kwargs):
     res = yield functions.checkAmmoLevel((g_currentVehicle.item, ))
     if res:
         func(*args, **kwargs)
     elif kwargs.get('callback') is not None:
         kwargs.get('callback')(False)
     return
Пример #4
0
 def wrapper(*args, **kwargs):
     res = yield checkAmmoLevel()
     if res:
         func(*args, **kwargs)
     elif kwargs.get('callback') is not None:
         kwargs.get('callback')(False)
     return
Пример #5
0
 def wrapper(*args, **kwargs):
     vehicles = self.storage.getSelectedVehicles()
     res = yield functions.checkAmmoLevel(vehicles)
     if res:
         func(*args, **kwargs)
     elif kwargs.get('callback') is not None:
         kwargs.get('callback')(False)
     return
Пример #6
0
 def wrapper(*args, **kwargs):
     vehicles = self.storage.getSelectedVehicles()
     res = yield functions.checkAmmoLevel(vehicles)
     if res:
         func(*args, **kwargs)
     elif kwargs.get('callback') is not None:
         kwargs.get('callback')(False)
     return
Пример #7
0
 def __doJoin(self, action = None):
     if not hasattr(BigWorld.player(), 'enqueueRandom'):
         LOG_ERROR('Player has not method enqueueRandom', BigWorld.player())
         yield lambda callback = None: callback
     mapID = 0
     if action and action.mapID:
         mapID = action.mapID
         LOG_DEBUG('Demonstrator mapID:', ArenaType.g_cache[mapID].geometryName)
     result = yield checkAmmoLevel()
     if result:
         gameplayMask = gameplay_ctx.getMask()
         invID = g_currentVehicle.invID
         BigWorld.player().enqueueRandom(invID, gameplaysMask=gameplayMask, arenaTypeID=mapID)
         LOG_DEBUG('Player joined to enqueue (invID, gameplayMask, mapID) =', invID, gameplayMask, mapID)
     return
Пример #8
0
 def __doJoin(self, action=None):
     if not hasattr(BigWorld.player(), 'enqueueRandom'):
         LOG_ERROR('Player has not method enqueueRandom', BigWorld.player())
         yield lambda callback=None: callback
     mapID = 0
     if action and action.mapID:
         mapID = action.mapID
         LOG_DEBUG('Demonstrator mapID:',
                   ArenaType.g_cache[mapID].geometryName)
     result = yield checkAmmoLevel()
     if result:
         gameplayMask = gameplay_ctx.getMask()
         invID = g_currentVehicle.invID
         BigWorld.player().enqueueRandom(invID,
                                         gameplaysMask=gameplayMask,
                                         arenaTypeID=mapID)
         LOG_DEBUG(
             'Player joined to enqueue (invID, gameplayMask, mapID) =',
             invID, gameplayMask, mapID)
     return
Пример #9
0
 def __loadTrainingList(self):
     result = yield checkAmmoLevel()
     if result:
         g_eventDispatcher.loadTrainingList()
Пример #10
0
 def __loadTrainingList(self):
     result = yield checkAmmoLevel()
     if result:
         events_dispatcher.loadTrainingList()
Пример #11
0
 def wrapper(*args, **kwargs):
     res = yield checkAmmoLevel(getFalloutCtrl().getSelectedVehicles())
     if res:
         func(*args, **kwargs)
     elif kwargs.get('callback') is not None:
         kwargs.get('callback')(False)