Beispiel #1
0
 def _isLastUnlocked(self, nodeCD):
     if self.getItem(nodeCD).isPremium:
         return False
     nextLevels = g_techTreeDP.getNextLevel(nodeCD)
     isAvailable = lambda self, nextCD: self.getItem(
         nextCD).isUnlocked or g_techTreeDP.isVehicleAvailableToUnlock(
             nextCD)[0]
     isNextUnavailable = any(
         (not isAvailable(self, nextCD) for nextCD in nextLevels))
     return isNextUnavailable or not nextLevels
Beispiel #2
0
 def __getContextHintsID(self):
     rootCD = self._data.getRootCD()
     hasParents = len(g_techTreeDP.getTopLevel(rootCD))
     hasChildren = len(g_techTreeDP.getNextLevel(rootCD))
     if hasParents and hasChildren:
         return RESEARCH_HINT_ID.BASE
     elif hasParents:
         return RESEARCH_HINT_ID.TOP
     elif hasChildren:
         return RESEARCH_HINT_ID.ROOT
     else:
         return RESEARCH_HINT_ID.ALONE
Beispiel #3
0
 def __getContextHintsID(self):
     rootCD = self._data.getRootCD()
     hasParents = len(g_techTreeDP.getTopLevel(rootCD))
     hasChildren = len(g_techTreeDP.getNextLevel(rootCD))
     if hasParents and hasChildren:
         return RESEARCH_HINT_ID.BASE
     elif hasParents:
         return RESEARCH_HINT_ID.TOP
     elif hasChildren:
         return RESEARCH_HINT_ID.ROOT
     else:
         return RESEARCH_HINT_ID.ALONE
 def __getContextHintsID(self):
     rootCD = self._data.getRootCD()
     hasParents = len(g_techTreeDP.getTopLevel(rootCD))
     hasChildren = len(g_techTreeDP.getNextLevel(rootCD))
     vehicle = self.itemsCache.items.getItemByCD(rootCD)
     if hasParents and hasChildren:
         return RESEARCH_HINT_ID.BASE
     elif hasParents:
         return RESEARCH_HINT_ID.TOP
     elif hasChildren:
         return RESEARCH_HINT_ID.ROOT
     else:
         return RESEARCH_HINT_ID.PREMIUM if vehicle is not None and vehicle.isPremium else RESEARCH_HINT_ID.IGR
Beispiel #5
0
 def __getContextHintsID(self):
     rootCD = self._data.getRootCD()
     hasParents = len(g_techTreeDP.getTopLevel(rootCD))
     hasChildren = len(g_techTreeDP.getNextLevel(rootCD))
     vehicle = g_itemsCache.items.getItemByCD(rootCD)
     if hasParents and hasChildren:
         return RESEARCH_HINT_ID.BASE
     elif hasParents:
         return RESEARCH_HINT_ID.TOP
     elif hasChildren:
         return RESEARCH_HINT_ID.ROOT
     elif vehicle is not None and vehicle.isPremium:
         return RESEARCH_HINT_ID.PREMIUM
     else:
         return RESEARCH_HINT_ID.IGR_OR_FALLOUT
         return