diff --git a/start_game.bat b/start_game.bat index 05b5b8ef..1cefe1ba 100644 --- a/start_game.bat +++ b/start_game.bat @@ -2,7 +2,6 @@ title TTU Game Launcher set /P PPYTHON_PATH= -1 and newIndex < len(TTLocalizer.NumToColor): + self.index = newIndex + self.updateGuiByIndex() + + def updateGuiByIndex(self): + self.color['text'] = TTLocalizer.NumToColor[self.index] + self.color['text_fg'] = allColorsList[self.index] + + def handleBuy(self): + self.d_requestTransformation(self.index) + def initToonState(self): self.setAnimState('neutral', 1.05, None, None) self.setPosHpr(101, -14, 4, -305, 0, 0) @@ -46,8 +116,10 @@ class DistributedNPCGlove(DistributedNPCToonBase): def handleCollisionSphereEnter(self, collEntry): self.currentTime = time.time() + if self.nextCollision <= self.currentTime: self.fsm.request('pickColor') + self.nextCollision = self.currentTime + 2 def enterOff(self): @@ -58,20 +130,28 @@ class DistributedNPCGlove(DistributedNPCToonBase): def enterPickColor(self): base.cr.playGame.getPlace().setState('stopped') - taskMgr.doMethodLater(15, self.reset, 'npcSleepTask-%s' % self.doId) - self.popupPickColorGUI() + taskMgr.doMethodLater(45, self.exitPickColor, 'npcSleepTask-%s' % self.doId) + self.setChatAbsolute('', CFSpeech) + + if base.localAvatar.getMoney() < ToontownGlobals.GloveCost: + self.setChatAbsolute(self.getMessageById(2), CFSpeech|CFTimeout) + self.reset() + else: + self.popupPickColorGUI() def exitPickColor(self, task=None): taskMgr.remove('npcSleepTask-%s' % self.doId) - + self.destroyGui() + taskMgr.doMethodLater(0.5, self.reset, 'avatarRecover-%s-%s' % (self.doId, base.localAvatar.doId)) + if task is not None: return task.done def popupPickColorGUI(self): self.setChatAbsolute('', CFSpeech) - self.setChatAbsolute("Hi fucker", CFSpeech) + self.setChatAbsolute(TTLocalizer.GlovePickColorMessage, CFSpeech) base.setCellsActive(base.bottomCells, 0) - self.d_requestTransformation(8) + self.createGui() def getMessageById(self, response): if response == 1: @@ -97,6 +177,11 @@ class DistributedNPCGlove(DistributedNPCToonBase): self.sendUpdate('requestTransformation', [color]) self.reset() + def leave(self): + self.setChatAbsolute('', CFSpeech) + self.setChatAbsolute(TTLocalizer.GloveByeMessage, CFSpeech|CFTimeout) + self.reset() + def reset(self, task=None): self.fsm.request('off') base.cr.playGame.getPlace().setState('walk') diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index 9eb23fbe..f71e52ed 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -9786,9 +9786,15 @@ InteractivePropTrackBonusTerms = {0: 'Super Toon-Up!', 5: 'Super Squirt!', 6: ''} PlayingCardUnknown = 'Card Name is unknown' -GloveSameColorMessage = 'You already have that glove!' +GloveSameColorMessage = 'You already have those gloves!' GloveNoMoneyMessage = "You don't have enough jellybeans!" -GloveSuccessMessage = 'Have fun with your new glove!' +GloveSuccessMessage = 'Have fun with your new gloves!' +GloveByeMessage = 'See you later!' +GlovePickColorMessage = 'Feel free to choose!' +GloveGuiTitle = 'Choose a glove color!' +GloveGuiNotice = 'Costs %s jellybeans.' +GloveGuiBuy = 'Buy' +GloveGuiCancel = 'Cancel' # Buffs