Exemple #1
0
 def json_section(self):
     clientVersion = getShortClientVersion().replace('v.', '').strip()
     gui_mods = '/'.join([
         '.', 'res_mods', clientVersion, 'scripts', 'client', 'gui', 'mods'
     ])
     configs = '/'.join(['.', 'res_mods', 'configs', 'ekspoint'])
     mods = '/'.join(['.', 'mods', 'configs', 'ekspoint'])
     return [gui_mods, configs, mods]
def _getVersionMessage(promo):
    return {
        'message':
        '{0} {1}'.format(
            text_styles.main(i18n.makeString(MENU.PROMO_PATCH_MESSAGE)),
            text_styles.stats(getShortClientVersion())),
        'label':
        i18n.makeString(MENU.PROMO_TOARCHIVE),
        'promoEnabel':
        promo.isPatchPromoAvailable(),
        'tooltip':
        TOOLTIPS.LOBBYMENU_VERSIONINFOBUTTON
    }
Exemple #3
0
 def _populate(self):
     super(LobbyMenu, self)._populate()
     self.__addListeners()
     state = MENU_CONSTANTS.STATE_SHOW_ALL
     if self.bootcamp.isInBootcamp():
         state = MENU_CONSTANTS.STATE_HIDE_ALL
     elif constants.IS_CHINA:
         state = MENU_CONSTANTS.STATE_SHOW_SERVER_NAME
     elif not constants.IS_SHOW_SERVER_STATS:
         state = MENU_CONSTANTS.STATE_HIDE_SERVER_STATS_ITEM
     self.as_setMenuStateS(state)
     self.as_setVersionMessageS('{0} {1}'.format(
         text_styles.main(i18n.makeString(MENU.PROMO_PATCH_MESSAGE)),
         text_styles.stats(getShortClientVersion())))
     postIconClose = icons.makeImageTag(
         RES_ICONS.MAPS_ICONS_LIBRARY_POST_CLOSE, 26, 22, -5, 0)
     postIconOpen = icons.makeImageTag(
         RES_ICONS.MAPS_ICONS_LIBRARY_POST_OPEN, 26, 22, -5, 0)
     self.as_setPostButtonIconsS(postIconClose, postIconOpen)
     bootcampIcon = RES_ICONS.MAPS_ICONS_BOOTCAMP_MENU_MENUBOOTCAMPICON
     bootcampIconSource = icons.makeImageTag(bootcampIcon, 33, 27, -8, 0)
     if self.bootcamp.isInBootcamp():
         self.as_setBootcampButtonLabelS(BOOTCAMP.REQUEST_BOOTCAMP_FINISH,
                                         bootcampIconSource)
     elif self.lobbyContext.getServerSettings().isBootcampEnabled():
         if self.bootcamp.runCount() > 0:
             bootcampLabel = BOOTCAMP.REQUEST_BOOTCAMP_RETURN
         else:
             bootcampLabel = BOOTCAMP.REQUEST_BOOTCAMP_START
         self.as_setBootcampButtonLabelS(bootcampLabel, bootcampIconSource)
     else:
         self.as_showBootcampButtonS(False)
     if events.isPlayerEntityChanging:
         self.as_showBootcampButtonS(False)
     if not self.manualController.isActivated(
     ) or self.bootcamp.isInBootcamp() or self.__isInQueue():
         self.as_showManualButtonS(False)
     self.__setPostFieldButtonVisible(self.promo.isActive())
Exemple #4
0
def getClientVersion():
	realm = constants.CURRENT_REALM.lower()
	version = helpers.getShortClientVersion().strip()
	return Versioning.ProvidedClientVersion(realm, Versioning.Version.parseVersion(version))
Exemple #5
0
def _getVersionMessage():
    return {'message': '{0} {1}'.format(text_styles.main(i18n.makeString(MENU.PROMO_PATCH_MESSAGE)), text_styles.stats(getShortClientVersion())),
     'label': i18n.makeString(MENU.PROMO_TOARCHIVE),
     'promoEnabel': game_control.g_instance.promo.isPatchPromoAvailable(),
     'tooltip': TOOLTIPS.LOBBYMENU_VERSIONINFOBUTTON}
Exemple #6
0
def _getVersionMessage():
    return ('{0} {1}'.format(
        text_styles.main(i18n.makeString(MENU.PROMO_PATCH_MESSAGE)),
        text_styles.stats(getShortClientVersion())), )