示例#1
0
 def rc_onRentChange(self, vehicles):
     if (
         g_currentVehicle.isPresent()
         and g_currentVehicle.item.intCD in vehicles
         and g_currentVehicle.isDisabledInRent()
         and g_currentVehicle.isInPrebattle()
     ):
         self.__collection.reset()
def _getTankmanLockMessage(invVehicle):
    if invVehicle.isInBattle:
        return (True, i18n.makeString('#menu:tankmen/lockReason/inbattle'))
    if invVehicle.invID == g_currentVehicle.invID and (
            g_currentVehicle.isInPrebattle() or g_currentVehicle.isInBattle()):
        return (True, i18n.makeString('#menu:tankmen/lockReason/prebattle'))
    return (True, i18n.makeString('#menu:tankmen/lockReason/disabled')
            ) if invVehicle.isDisabled else (False, '')
示例#3
0
def _getTankmanLockMessage(invVehicle):
    if invVehicle.lock == LOCK_REASON.ON_ARENA:
        return (True, i18n.makeString('#menu:tankmen/lockReason/inbattle'))
    elif invVehicle.repairCost > 0:
        return (True, i18n.makeString('#menu:tankmen/lockReason/broken'))
    elif invVehicle.invID == g_currentVehicle.invID and (g_currentVehicle.isInPrebattle() or g_currentVehicle.isInBattle()):
        return (True, i18n.makeString('#menu:tankmen/lockReason/prebattle'))
    else:
        return (False, '')
示例#4
0
def _getTankmanLockMessage(invVehicle):
    if invVehicle.lock == LOCK_REASON.ON_ARENA:
        return (True, i18n.makeString('#menu:tankmen/lockReason/inbattle'))
    elif invVehicle.repairCost > 0:
        return (True, i18n.makeString('#menu:tankmen/lockReason/broken'))
    elif invVehicle.invID == g_currentVehicle.invID and (g_currentVehicle.isInPrebattle() or g_currentVehicle.isInBattle()):
        return (True, i18n.makeString('#menu:tankmen/lockReason/prebattle'))
    else:
        return (False, '')
示例#5
0
 def rc_onRentChange(self, vehicles):
     """
     Rental listener for vehicles state update. Resets current player's state.
     Args:
         vehicles: list of affected vehicle intCDs
     """
     if g_currentVehicle.isPresent(
     ) and g_currentVehicle.item.intCD in vehicles and g_currentVehicle.isDisabledInRent(
     ) and g_currentVehicle.isInPrebattle():
         self.__entity.resetPlayerState()
示例#6
0
 def igr_onRoomChange(self, roomType, xpFactor):
     """
     IGR listener for room state. Resets current player's state when he is in premium IGR,
     joined some prebattle and this room is no more premium.
     Args:
         roomType: new IGR room type
         xpFactor: xp boost factor
     """
     if roomType != IGR_TYPE.PREMIUM:
         if g_currentVehicle.isPremiumIGR(
         ) and g_currentVehicle.isInPrebattle():
             self.__entity.resetPlayerState()
示例#7
0
 def igr_onRoomChange(self, roomType, _):
     if roomType != IGR_TYPE.PREMIUM:
         if g_currentVehicle.isPremiumIGR(
         ) and g_currentVehicle.isInPrebattle():
             self.__collection.reset()
示例#8
0
 def rc_onRentChange(self, vehicles):
     if g_currentVehicle.isPresent(
     ) and g_currentVehicle.item.intCD in vehicles and g_currentVehicle.isDisabledInRent(
     ) and g_currentVehicle.isInPrebattle():
         self.__collection.reset()
示例#9
0
 def igr_onRoomChange(self, roomType, _):
     if roomType != IGR_TYPE.PREMIUM:
         if g_currentVehicle.isPremiumIGR() and g_currentVehicle.isInPrebattle():
             self.__collection.reset()
示例#10
0
 def igr_onRoomChange(self, roomType, xpFactor):
     if roomType != IGR_TYPE.PREMIUM:
         if g_currentVehicle.isPremiumIGR(
         ) and g_currentVehicle.isInPrebattle():
             self.__entity.resetPlayerState()
示例#11
0
 def rc_onRentChange(self, vehicles):
     if g_currentVehicle.isPresent(
     ) and g_currentVehicle.item.intCD in vehicles and g_currentVehicle.isDisabledInRent(
     ) and g_currentVehicle.isInPrebattle():
         self.__entity.resetPlayerState()