From 5447ed529c87dea966e009260e4e7bbd82bda75e Mon Sep 17 00:00:00 2001 From: John Cote Date: Wed, 8 Jan 2020 02:14:35 -0500 Subject: [PATCH] cogdominium: fix sellbot field offices --- otp/avatar/SpeedMonitor.py | 2 +- toontown/cogdominium/CogdoElevatorMovie.py | 2 -- toontown/cogdominium/CogdoExecutiveSuiteMovies.py | 2 -- toontown/cogdominium/CogdoMazeGameMovies.py | 2 -- toontown/minigame/MazeSuit.py | 3 ++- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/otp/avatar/SpeedMonitor.py b/otp/avatar/SpeedMonitor.py index 57068ac..3167081 100644 --- a/otp/avatar/SpeedMonitor.py +++ b/otp/avatar/SpeedMonitor.py @@ -18,7 +18,7 @@ class SpeedMonitor: taskMgr.remove(self._trackTask) def _allocToken(self): - return 'speedMonitorToken-%s-%s-%s' % (self._name, id(self), next(SpeedMonitor.SerialGen)) + return 'speedMonitorToken-%s-%s-%s' % (self._name, id(self), SpeedMonitor.SerialGen.next()) def addNodepath(self, nodepath): token = self._allocToken() diff --git a/toontown/cogdominium/CogdoElevatorMovie.py b/toontown/cogdominium/CogdoElevatorMovie.py index 84e1858..a5413b7 100644 --- a/toontown/cogdominium/CogdoElevatorMovie.py +++ b/toontown/cogdominium/CogdoElevatorMovie.py @@ -45,8 +45,6 @@ class CogdoElevatorMovie(CogdoGameMovie): for part in suit.getHeadParts(): part.hide() - suit.loop('neutral') - def load(self): self.notify.debug('load()') CogdoGameMovie.load(self) diff --git a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py index a356f24..410e8df 100644 --- a/toontown/cogdominium/CogdoExecutiveSuiteMovies.py +++ b/toontown/cogdominium/CogdoExecutiveSuiteMovies.py @@ -50,8 +50,6 @@ class CogdoExecutiveSuiteIntro(CogdoGameMovie): for part in suit.getHeadParts(): part.hide() - suit.loop('neutral') - def load(self): self.notify.debug('load()') CogdoGameMovie.load(self) diff --git a/toontown/cogdominium/CogdoMazeGameMovies.py b/toontown/cogdominium/CogdoMazeGameMovies.py index e2d98ab..9bed1f7 100644 --- a/toontown/cogdominium/CogdoMazeGameMovies.py +++ b/toontown/cogdominium/CogdoMazeGameMovies.py @@ -51,8 +51,6 @@ class CogdoMazeGameIntro(CogdoGameMovie): for part in suit.getHeadParts(): part.hide() - suit.loop('neutral') - def load(self): CogdoGameMovie.load(self) self.toonDNA = ToonDNA.ToonDNA() diff --git a/toontown/minigame/MazeSuit.py b/toontown/minigame/MazeSuit.py index 5994ba0..40cc11d 100644 --- a/toontown/minigame/MazeSuit.py +++ b/toontown/minigame/MazeSuit.py @@ -8,6 +8,7 @@ from toontown.suit import Suit from toontown.suit import SuitDNA from toontown.toonbase import ToontownGlobals from . import MazeGameGlobals +import functools class MazeSuit(DirectObject): COLL_SPHERE_NAME = 'MazeSuitSphere' @@ -233,7 +234,7 @@ class MazeSuit(DirectObject): updateTics = suitList[i].getThinkTimestampTics(curTic) suitUpdates.extend(list(zip(updateTics, [i] * len(updateTics)))) - suitUpdates.sort(lambda a, b: a[0] - b[0]) + suitUpdates.sort(key=functools.cmp_to_key(lambda a, b: a[0] - b[0])) if len(suitUpdates) > 0: curTic = 0 for i in range(len(suitUpdates)):