def _packStatusBlock(self, data): status = '' if data['status'] == STATUS.ON_BOARD: status = text_styles.statInfo( _ms('#vehicle_customization:customization/tooltip/status/onBoard' )) elif data['status'] == STATUS.ALREADY_HAVE: status = text_styles.statInfo( _ms('#vehicle_customization:customization/tooltip/status/alreadyHave' )) elif data['status'] == STATUS.AVAILABLE_FOR_BUY: status = text_styles.warning( _ms('#vehicle_customization:customization/tooltip/status/availableForBuy' )) elif data['status'] == STATUS.DO_MISSION: status = text_styles.warning( _ms('#vehicle_customization:customization/tooltip/status/doMission' )) elif data['status'] == STATUS.DO_IGR: status = icons.premiumIgrBig() return formatters.packTextBlockData(text=makeHtmlString( 'html_templates:lobby/textStyle', 'alignText', { 'align': 'center', 'message': status }), padding={ 'bottom': -4, 'top': -4 })
def getHangarMessage(self): if not self.isPresent(): return (Vehicle.VEHICLE_STATE.NOT_PRESENT, MENU.CURRENTVEHICLESTATUS_NOTPRESENT, Vehicle.VEHICLE_STATE_LEVEL.CRITICAL) state, stateLvl = self.item.getState() if state == Vehicle.VEHICLE_STATE.IN_PREMIUM_IGR_ONLY: icon = icons.premiumIgrBig() if self.item.isRented: rentLeftStr = getTimeLeftStr('#menu:vehicle/igrRentLeft/%s', self.item.rentInfo.getTimeLeft()) message = i18n.makeString('#menu:currentVehicleStatus/' + state, icon=icon, time=rentLeftStr) else: message = i18n.makeString( '#menu:tankCarousel/vehicleStates/inPremiumIgrOnly', icon=icon) return (state, message, stateLvl) falloutCtrl = getFalloutCtrl() if falloutCtrl and falloutCtrl.isSelected(): if not self.item.isFalloutAvailable or self.item.getCustomState( ) == Vehicle.VEHICLE_STATE.UNSUITABLE_TO_QUEUE: message = i18n.makeString( '#menu:tankCarousel/vehicleStates/%s' % Vehicle.VEHICLE_STATE.NOT_SUITABLE) return (state, message, Vehicle.VEHICLE_STATE_LEVEL.WARNING) message = '#menu:currentVehicleStatus/' + state return (state, message, stateLvl)
def getHangarMessage(self): if self.isPresent(): state, stateLvl = self.item.getState() if state == Vehicle.VEHICLE_STATE.IN_PREMIUM_IGR_ONLY: rentLeftStr = getTimeLeftStr('#menu:vehicle/igrRentLeft/%s', self.item.rentInfo.timeLeft) icon = icons.premiumIgrBig() if self.item.isRented: message = i18n.makeString('#menu:currentVehicleStatus/' + state, icon=icon, time=rentLeftStr) else: message = i18n.makeString('#menu:tankCarousel/vehicleStates/inPremiumIgrOnly', icon=icon) return (state, message, stateLvl) return (state, '#menu:currentVehicleStatus/' + state, stateLvl) return (Vehicle.VEHICLE_STATE.NOT_PRESENT, MENU.CURRENTVEHICLESTATUS_NOTPRESENT, Vehicle.VEHICLE_STATE_LEVEL.CRITICAL)
def getHangarMessage(self): if not self.isPresent(): return (Vehicle.VEHICLE_STATE.NOT_PRESENT, MENU.CURRENTVEHICLESTATUS_NOTPRESENT, Vehicle.VEHICLE_STATE_LEVEL.CRITICAL) state, stateLvl = self.item.getState() if state == Vehicle.VEHICLE_STATE.IN_PREMIUM_IGR_ONLY: icon = icons.premiumIgrBig() if self.item.isRented: rentLeftStr = getTimeLeftStr('#menu:vehicle/igrRentLeft/%s', self.item.rentInfo.getTimeLeft()) message = i18n.makeString('#menu:currentVehicleStatus/' + state, icon=icon, time=rentLeftStr) else: message = i18n.makeString('#menu:tankCarousel/vehicleStates/inPremiumIgrOnly', icon=icon) return (state, message, stateLvl) message = '#menu:currentVehicleStatus/' + state return (state, message, stateLvl)
def _packStatusBlock(self, item): status = '' if item['status'] == STATUS.ON_BOARD: status = text_styles.statInfo(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_ONBOARD)) elif item['status'] == STATUS.ALREADY_HAVE: status = text_styles.statInfo(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_ALREADYHAVE)) elif item['status'] == STATUS.AVAILABLE_FOR_BUY: status = text_styles.warning(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_AVAILABLEFORBUY)) elif item['status'] == STATUS.DO_MISSION: status = text_styles.warning(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_DOMISSION)) elif item['status'] == STATUS.DO_IGR: status = icons.premiumIgrBig() return formatters.packTextBlockData(text=makeHtmlString('html_templates:lobby/textStyle', 'alignText', {'align': 'center', 'message': status}), padding={'bottom': -4, 'top': -4})
def _packStatusBlock(self, data): status = '' if data['status'] == STATUS.ON_BOARD: status = text_styles.statInfo(_ms('#vehicle_customization:customization/tooltip/status/onBoard')) elif data['status'] == STATUS.ALREADY_HAVE: status = text_styles.statInfo(_ms('#vehicle_customization:customization/tooltip/status/alreadyHave')) elif data['status'] == STATUS.AVAILABLE_FOR_BUY: status = text_styles.warning(_ms('#vehicle_customization:customization/tooltip/status/availableForBuy')) elif data['status'] == STATUS.DO_MISSION: status = text_styles.warning(_ms('#vehicle_customization:customization/tooltip/status/doMission')) elif data['status'] == STATUS.DO_IGR: status = icons.premiumIgrBig() return formatters.packTextBlockData(text=makeHtmlString('html_templates:lobby/textStyle', 'alignText', {'align': 'center', 'message': status}), padding={'bottom': -4, 'top': -4})
def _packStatusBlock(self, item): status = "" if item["status"] == STATUS.ON_BOARD: status = text_styles.statInfo(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_ONBOARD)) elif item["status"] == STATUS.ALREADY_HAVE: status = text_styles.statInfo(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_ALREADYHAVE)) elif item["status"] == STATUS.AVAILABLE_FOR_BUY: status = text_styles.warning(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_AVAILABLEFORBUY)) elif item["status"] == STATUS.DO_MISSION: status = text_styles.warning(_ms(VEHICLE_CUSTOMIZATION.CUSTOMIZATION_TOOLTIP_STATUS_DOMISSION)) elif item["status"] == STATUS.DO_IGR: status = icons.premiumIgrBig() return formatters.packTextBlockData( text=makeHtmlString("html_templates:lobby/textStyle", "alignText", {"align": "center", "message": status}), padding={"bottom": -4, "top": -4}, )
def getHangarMessage(self): if not self.isPresent(): return (Vehicle.VEHICLE_STATE.NOT_PRESENT, MENU.CURRENTVEHICLESTATUS_NOTPRESENT, Vehicle.VEHICLE_STATE_LEVEL.CRITICAL) state, stateLvl = self.item.getState() if state == Vehicle.VEHICLE_STATE.IN_PREMIUM_IGR_ONLY: icon = icons.premiumIgrBig() if self.item.isRented: rentLeftStr = getTimeLeftStr('#menu:vehicle/igrRentLeft/%s', self.item.rentInfo.getTimeLeft()) message = i18n.makeString('#menu:currentVehicleStatus/' + state, icon=icon, time=rentLeftStr) else: message = i18n.makeString('#menu:tankCarousel/vehicleStates/inPremiumIgrOnly', icon=icon) return (state, message, stateLvl) falloutCtrl = getFalloutCtrl() if falloutCtrl and falloutCtrl.isSelected(): if not self.item.isFalloutAvailable or self.item.getCustomState() == Vehicle.VEHICLE_STATE.UNSUITABLE_TO_QUEUE: message = i18n.makeString('#menu:tankCarousel/vehicleStates/%s' % Vehicle.VEHICLE_STATE.NOT_SUITABLE) return (state, message, Vehicle.VEHICLE_STATE_LEVEL.WARNING) message = '#menu:currentVehicleStatus/' + state return (state, message, stateLvl)