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." RestockCheaterMessage = "No cheaters allowed! Your transaction has been declined."
InVP = ' in a V.P. Battle' InVP = ' in a V.P. Battle'
InFieldOffice = ' in a Sellbot Field Office' 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.accept(self.hpChangeEvent, self.updateHealthBar)
self.updateHealthBar() self.updateHealthBar()
self.healthBar.show() self.healthBar.show()
if self.suit.isSkelecog == 1: if self.suit.virtual:
self.type = 'Skel' self.setTypeText(TTLocalizer.CogPanelVirtual)
self.setTypeText(self.type) elif self.suit.isWaiter:
self.suitRevives = self.suit.getSkeleRevives() self.setTypeText(TTLocalizer.CogPanelWaiter)
if self.suitRevives == 1: elif self.suit.skeleRevives:
self.type = 'v2.0' self.setTypeText(TTLocalizer.CogPanelRevives % (self.suit.skeleRevives + 1))
self.setTypeText(self.type) elif self.suit.isSkelecog:
if self.suitRevives < 1 and self.suit.isSkelecog == 0: self.setTypeText(TTLocalizer.CogPanelSkeleton)
self.type = '' else:
self.setTypeText(self.type) self.setTypeText('')
def getSuit(self, suit): def getSuit(self, suit):
return self.suit return self.suit
def setLevelText(self, level): def setLevelText(self, level):
self.levelText['text'] = 'Level '+ str(level) self.levelText['text'] = TTLocalizer.CogPanelLevel % level
def setTypeText(self, suitType): def setTypeText(self, suitType):
self.suitType['text'] = suitType self.suitType['text'] = suitType
@ -226,4 +226,4 @@ class TownBattleCogPanel(DirectFrame):
del self.suit del self.suit
del self.maxHP del self.maxHP
del self.currHP del self.currHP
DirectFrame.destroy(self) DirectFrame.destroy(self)