def start(self, location): self.notify.debug('starting DistributedRepairGame') if self.gameFSM: self.gameFSM.request('Off') self.location = location if location == ON_LAND: base.loadingScreen.showTarget(benchRepair = True) else: base.loadingScreen.showTarget(shipRepair = True) base.cr.loadingScreen.show() self.gameIndexRequested = -1 self.gameProgress = [ GAME_OPEN] * self.getGameCount() self.gameFSM = RepairGameFSM(self) self.gameFSM.request('Init') self.difficultyMax = DIFFICULTY_MAX + 0.0 self.doIds2Rewards = { } self.cycleCompleteTime = 0 self.currentGame = None self.gui = RepairGameGUI(self) base.loadingScreen.beginStep('left') self.repairClock = RepairClock(self) self.mousePicker = RepairMousePicker() self.games = [] self.avIds2CurrentGameIndex = { } base.loadingScreen.endStep('left') base.loadingScreen.beginStep('games', 1, 48) for gameClass in GAME_ORDER[self.location]: self.games.append(gameClass(self)) base.loadingScreen.endStep('games') self.gui.setGames(self.games) base.loadingScreen.beginStep('Intro') self.gameFSM.request('Intro') base.loadingScreen.endStep('Intro') base.loadingScreen.hide()