def togglePlayerReadyAction(self, launchChain=False):
     notReady = not self.getPlayerInfo().isReady
     if notReady:
         waitingID = 'prebattle/player_ready'
     else:
         waitingID = 'prebattle/player_not_ready'
     if launchChain:
         if notReady:
             BigWorld.player().changeEventEnqueueData({})
             selVehCtx = SetVehicleUnitCtx(vTypeCD=g_currentVehicle.item.intCD, waitingID='prebattle/change_settings')
             selVehCtx.setReady = True
             self.setVehicle(selVehCtx)
         else:
             ctx = SetReadyUnitCtx(False, 'prebattle/player_not_ready')
             ctx.resetVehicle = True
             LOG_DEBUG('Unit request', ctx)
             self.setPlayerReady(ctx)
     else:
         ctx = SetReadyUnitCtx(notReady, waitingID)
         LOG_DEBUG('Unit request', ctx)
         self.setPlayerReady(ctx)
 def _selectVehicles(self, items):
     if items:
         self.sendRequest(
             SetVehicleUnitCtx(vTypeCD=items[0],
                               waitingID='prebattle/change_settings'))