Пример #1
0
 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)
Пример #2
0
 def __updateVehIGRStatus(self):
     vehicleIgrTimeLeft = ''
     igrType = game_control.g_instance.igr.getRoomType()
     if g_currentVehicle.isPresent() and g_currentVehicle.isPremiumIGR() and igrType == IGR_TYPE.PREMIUM:
         igrActionIcon = makeHtmlString('html_templates:igr/iconSmall', 'premium', {})
         localization = '#menu:vehicleIgr/%s'
         rentInfo = g_currentVehicle.item.rentInfo
         vehicleIgrTimeLeft = getTimeLeftStr(localization, rentInfo.getTimeLeft(), timeStyle=text_styles.stats, ctx={'igrIcon': igrActionIcon})
     self.as_setVehicleIGRS(vehicleIgrTimeLeft)
Пример #3
0
 def __updateVehIGRStatus(self):
     vehicleIgrTimeLeft = None
     igrType = self.igrCtrl.getRoomType()
     if g_currentVehicle.isPresent() and g_currentVehicle.isPremiumIGR() and igrType == IGR_TYPE.PREMIUM:
         igrActionIcon = makeHtmlString('html_templates:igr/iconSmall', 'premium', {})
         localization = '#menu:vehicleIgr/%s'
         rentInfo = g_currentVehicle.item.rentInfo
         vehicleIgrTimeLeft = getTimeLeftStr(localization, rentInfo.getTimeLeft(), timeStyle=text_styles.stats, ctx={'igrIcon': igrActionIcon})
     self.as_actionIGRDaysLeftS(vehicleIgrTimeLeft is not None, text_styles.main(vehicleIgrTimeLeft))
     return
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 def __updateVehIGRStatus(self):
     vehicleIgrTimeLeft = ''
     igrType = game_control.g_instance.igr.getRoomType()
     if g_currentVehicle.isPresent() and g_currentVehicle.isPremiumIGR(
     ) and igrType == IGR_TYPE.PREMIUM:
         igrActionIcon = makeHtmlString('html_templates:igr/iconSmall',
                                        'premium', {})
         localization = '#menu:vehicleIgr/%s'
         rentInfo = g_currentVehicle.item.rentInfo
         vehicleIgrTimeLeft = getTimeLeftStr(localization,
                                             rentInfo.getTimeLeft(),
                                             timeStyle=text_styles.stats,
                                             ctx={'igrIcon': igrActionIcon})
     self.as_setVehicleIGRS(vehicleIgrTimeLeft)
Пример #7
0
 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)