def onBecomePlayer(self):
     g_eventBus.handleEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.BOOTCAMP_BATTLE_HIGHLIGHTS, None,
             {'descriptors': g_bootcampHintsConfig.getItems()}),
         EVENT_BUS_SCOPE.BATTLE)
     return
 def updateDescriptors(self, componentID):
     from bootcamp.BootcampLobbyHintsConfig import g_bootcampHintsConfig
     from bootcamp.BootcampGarage import g_bootcampGarage
     nationData = g_bootcampGarage.getNationData()
     component = g_bootcampHintsConfig.objects[componentID]
     if componentID == 'ResearchNode':
         component['asInt'] = nationData['module']
     elif componentID == 'AmmunitionSlot':
         component['path'] = 'ammunitionPanel.{0}'.format(
             nationData['module_type'])
     elif componentID == 'ResearchNodeTankII':
         component['asInt'] = nationData['vehicle_second']
     elif componentID == 'TechNodeUsa':
         component['asInt'] = nationData['vehicle_first']
     elif componentID == 'ServiceSlotRepairOption':
         component['asInt'] = nationData['consumable']
     elif componentID == 'OptionalDevice':
         component['asInt'] = nationData['equipment']
     elif componentID == 'PersonalCaseSkill':
         component['skillId'] = nationData['perk']
     elif componentID == 'SkillSlot':
         component['skillId'] = nationData['perk']
     elif componentID == 'SecondTank':
         itemsCache = dependency.instance(IItemsCache)
         vehicleCD = nationData['vehicle_second']
         vehicle = itemsCache.items.getItemByCD(vehicleCD)
         component['TankIndex'] = str(vehicle.invID)
     self.setDescriptors(g_bootcampHintsConfig.getItems())
Beispiel #3
0
 def onLobbyInited(self, event):
     g_eventBus.handleEvent(
         events.LoadViewEvent(
             VIEW_ALIAS.BOOTCAMP_LOBBY_HIGHLIGHTS, None,
             {'descriptors': g_bootcampHintsConfig.getItems()}),
         EVENT_BUS_SCOPE.LOBBY)
     return