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, '')
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, '')
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()
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()
def igr_onRoomChange(self, roomType, _): if roomType != IGR_TYPE.PREMIUM: if g_currentVehicle.isPremiumIGR( ) and g_currentVehicle.isInPrebattle(): self.__collection.reset()
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 igr_onRoomChange(self, roomType, _): if roomType != IGR_TYPE.PREMIUM: if g_currentVehicle.isPremiumIGR() and g_currentVehicle.isInPrebattle(): self.__collection.reset()
def igr_onRoomChange(self, roomType, xpFactor): if roomType != IGR_TYPE.PREMIUM: if g_currentVehicle.isPremiumIGR( ) and g_currentVehicle.isInPrebattle(): self.__entity.resetPlayerState()
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()