DANIEL: Better cog panel text stuff

This commit is contained in:
John 2015-05-30 18:00:16 +03:00 committed by Loudrob
parent 128430f0c6
commit c3fa3bd3c3
2 changed files with 17 additions and 12 deletions

View file

@ -8456,3 +8456,8 @@ RestockAskMessage = "Would you like to\nrestock %s laff for %s jellybeans?"
RestockCheaterMessage = "No cheaters allowed! Your transaction has been declined."
InVP = ' in a V.P. Battle'
InFieldOffice = ' in a Sellbot Field Office'
CogPanelLevel = 'Level %s'
CogPanelSkeleton = 'Skeleton'
CogPanelVirtual = 'Virtual'
CogPanelRevives = 'v%s.0'
CogPanelWaiter = 'Waiter'

View file

@ -72,22 +72,22 @@ class TownBattleCogPanel(DirectFrame):
self.accept(self.hpChangeEvent, self.updateHealthBar)
self.updateHealthBar()
self.healthBar.show()
if self.suit.isSkelecog == 1:
self.type = 'Skel'
self.setTypeText(self.type)
self.suitRevives = self.suit.getSkeleRevives()
if self.suitRevives == 1:
self.type = 'v2.0'
self.setTypeText(self.type)
if self.suitRevives < 1 and self.suit.isSkelecog == 0:
self.type = ''
self.setTypeText(self.type)
if self.suit.virtual:
self.setTypeText(TTLocalizer.CogPanelVirtual)
elif self.suit.isWaiter:
self.setTypeText(TTLocalizer.CogPanelWaiter)
elif self.suit.skeleRevives:
self.setTypeText(TTLocalizer.CogPanelRevives % (self.suit.skeleRevives + 1))
elif self.suit.isSkelecog:
self.setTypeText(TTLocalizer.CogPanelSkeleton)
else:
self.setTypeText('')
def getSuit(self, suit):
return self.suit
def setLevelText(self, level):
self.levelText['text'] = 'Level '+ str(level)
self.levelText['text'] = TTLocalizer.CogPanelLevel % level
def setTypeText(self, suitType):
self.suitType['text'] = suitType
@ -226,4 +226,4 @@ class TownBattleCogPanel(DirectFrame):
del self.suit
del self.maxHP
del self.currHP
DirectFrame.destroy(self)
DirectFrame.destroy(self)