diff --git a/toontown/coghq/DistributedStage.py b/toontown/coghq/DistributedStage.py index 5a5e53ac..1f44ec69 100755 --- a/toontown/coghq/DistributedStage.py +++ b/toontown/coghq/DistributedStage.py @@ -301,6 +301,6 @@ class DistributedStage(DistributedObject.DistributedObject): self.titleText.setText('') def elevatorAlert(self, avId): - if base.localAvatar.doId != avId: + if base.localAvatar.doId != avId and avId in base.cr.doId2do: name = base.cr.doId2do[avId].getName() - self.showInfoText(TTLocalizer.stageToonEnterElevator % name) + self.showInfoText(TTLocalizer.StageToonEnterElevator % name) diff --git a/toontown/toon/DistributedNPCToonBaseAI.py b/toontown/toon/DistributedNPCToonBaseAI.py index 4c5746f3..14010eca 100755 --- a/toontown/toon/DistributedNPCToonBaseAI.py +++ b/toontown/toon/DistributedNPCToonBaseAI.py @@ -61,3 +61,6 @@ class DistributedNPCToonBaseAI(DistributedToonAI.DistributedToonAI): def getPositionIndex(self): return self.posIndex + + def getStartAnimState(self): + return 'neutral' diff --git a/toontown/toon/NPCToons.py b/toontown/toon/NPCToons.py index 1c2f7344..e1dd1d80 100755 --- a/toontown/toon/NPCToons.py +++ b/toontown/toon/NPCToons.py @@ -134,10 +134,7 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None): npc.setMaxHp(15) npc.setPositionIndex(posIndex) npc.generateWithRequired(zoneId) - if hasattr(npc, 'getStartAnimState'): - npc.d_setAnimState(npc.getStartAnimState(), 1.0) - else: - npc.d_setAnimState('neutral', 1.0) + npc.d_setAnimState(npc.getStartAnimState(), 1.0) return npc @@ -148,6 +145,7 @@ def createNpcsInZone(air, zoneId): for npcId in npcIdList: while npcIdList.count(npcId) > 1: npcIdList.remove(npcId) + npcIdList.sort() for i in xrange(len(npcIdList)): npcId = npcIdList[i] npcDesc = NPCToonDict.get(npcId) @@ -11927,6 +11925,9 @@ del lnames zone2NpcDict = {} def generateZone2NpcDict(): + if zone2NpcDict: + return + for id, npcDesc in NPCToonDict.items(): zoneId = npcDesc[0] if zoneId in zone2NpcDict: @@ -11937,20 +11938,12 @@ def generateZone2NpcDict(): def getNPCName(npcId): npc = NPCToonDict.get(npcId) - if npc: - return npc[1] - else: - return None - return None + return npc[1] if npc else None def getNPCZone(npcId): npc = NPCToonDict.get(npcId) - if npc: - return npc[0] - else: - return None - return None + return npc[0] if npc else None def getBuildingArticle(zoneId): diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index ad1b818a..66e11850 100755 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -4288,7 +4288,7 @@ HeadingToFactoryTitle = '%s' ForemanConfrontedMsg = '%s is battling the ' + Foreman + '!' MintBossConfrontedMsg = '%s is battling the Supervisor!' StageBossConfrontedMsg = '%s is battling the District Attorney!' -stageToonEnterElevator = '%s \nhas entered the elevator' +StageToonEnterElevator = '%s\nhas entered the elevator!' ForcedLeaveStageAckMsg = 'The Law Clerk was defeated before you could reach him. You did not recover any Jury Notices.' MinigameWaitingForOtherToons = 'Waiting for other toons to join...' MinigamePleaseWait = 'Please wait...' @@ -4701,7 +4701,7 @@ LawbotBossName = 'Chief Justice' BossbotBossName = 'C. E. O.' BossCogNameWithDept = '%(name)s\n%(dept)s' BossCogPromoteDoobers = 'You are hereby promoted to full-fledged %s. Congratulations!' -BossCogDoobersAway = {'s': 'Go! And make that sale!'} +BossCogDoobersAway = {'s': 'Go! And make that sale!'} BossCogWelcomeToons = 'Welcome, new Cogs!' BossCogPromoteToons = 'You are hereby promoted to full-fledged %s. Congratu--' CagedToonInterruptBoss = 'Hey! Hiya! Hey over there!'