def shutDown(self): if self.isShutdown: self.notify.warning('Got shutDown twice') return self.isShutdown = 1 from src.toontown.minigame import MinigameCreatorAI playAgainNum = self.getNumPlayAgain() if playAgainNum > 0: MinigameCreatorAI.createMinigame(self.air, self.getPlayAgainList(), self.trolleyZone, minigameZone=self.zoneId, previousGameId=self.previousMinigameId, newbieIds=self.newbieIds) else: MinigameCreatorAI.releaseMinigameZone(self.zoneId) self.requestDelete() self.ignoreAll() return None
def trolleyLeft(self): numPlayers = self.countFullSeats() if numPlayers > 0: newbieIds = [] for avId in self.seats: if avId: toon = self.air.doId2do.get(avId) if toon: if Quests.avatarHasTrolleyQuest(toon): if not Quests.avatarHasCompletedTrolleyQuest(toon): newbieIds.append(avId) playerArray = [] for i in self.seats: if i not in [None, 0]: playerArray.append(i) mgDict = MinigameCreatorAI.createMinigame( self.air, playerArray, self.zoneId, newbieIds=newbieIds) minigameZone = mgDict['minigameZone'] minigameId = mgDict['minigameId'] for seatIndex in xrange(len(self.seats)): avId = self.seats[seatIndex] if avId: self.sendUpdateToAvatarId(avId, 'setMinigameZone', [minigameZone, minigameId]) self.clearFullNow(seatIndex) else: self.notify.warning('The trolley left, but was empty.') self.enter()
def shutDown(self): if self.isShutdown: self.notify.warning('Got shutDown twice') return self.isShutdown = 1 from src.toontown.minigame import MinigameCreatorAI playAgainNum = self.getNumPlayAgain() if playAgainNum > 0: MinigameCreatorAI.createMinigame( self.air, self.getPlayAgainList(), self.trolleyZone, minigameZone=self.zoneId, previousGameId=self.previousMinigameId, newbieIds=self.newbieIds) else: MinigameCreatorAI.releaseMinigameZone(self.zoneId) self.requestDelete() self.ignoreAll() return None