storylineAgentsContentGroup.py (1413B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\agencyNew\contentGroups\missions\agents\storylineAgentsContentGroup.py 2 from eve.client.script.ui.shared.agencyNew.agencyUtil import GetTimeRemainingText 3 from eve.client.script.ui.shared.agencyNew.contentGroups import contentGroupConst 4 from eve.client.script.ui.shared.agencyNew.contentGroups.baseContentGroup import BaseContentGroup 5 from eve.client.script.ui.shared.agencyNew.ui.contentPages.contentPageStorylineAgents import ContentPageStorylineAgents 6 from localization import GetByLabel 7 8 class StorylineAgentsContentGroup(BaseContentGroup): 9 contentGroupID = contentGroupConst.contentGroupStorylineAgents 10 11 def IsEnabled(self): 12 return bool(self.GetContentProvider().GetActiveStorylineAgents()) 13 14 def GetDisabledHint(self): 15 return GetByLabel('UI/Agency/StorylineAgentsDisabledHint') 16 17 def GetTimeRemaining(self): 18 timesRemaining = [ contentPiece.GetTimeRemaining() for contentPiece in self.GetContentPieces() if contentPiece.GetTimeRemaining() > 0 ] 19 if timesRemaining: 20 return min(timesRemaining) 21 22 def GetExpiryTimeText(self): 23 return GetTimeRemainingText(self.GetTimeRemaining()) 24 25 def IsNewContentAvailable(self): 26 return self.IsEnabled() 27 28 @staticmethod 29 def GetContentPageClass(): 30 return ContentPageStorylineAgents