diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 46da715..00a0751 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -1867,15 +1867,15 @@ class OTPClientRepository(ClientRepositoryBase): return 0 def listActiveShards(self): - list = [] + activeShards = [] for s in list(self.activeDistrictMap.values()): if s.available: - list.append((s.doId, + activeShards.append((s.doId, s.name, s.avatarCount, s.newAvatarCount)) - return list + return activeShards def getPlayerAvatars(self): return [ i for i in list(self.doId2do.values()) if isinstance(i, DistributedPlayer) ] diff --git a/toontown/shtiker/IssueFrameV2.py b/toontown/shtiker/IssueFrameV2.py index 96fc51c..5eaa22c 100644 --- a/toontown/shtiker/IssueFrameV2.py +++ b/toontown/shtiker/IssueFrameV2.py @@ -33,7 +33,7 @@ class IssueFrameV2(IssueFrame.IssueFrame): def isSectionInIndex(self, sectionIdent): for name in self.newsIndexEntries: - if sectionIdent in name and self.dateStr in name: + if sectionIdent.encode('utf-8') in name and self.dateStr.encode('utf-8') in name: return True return False diff --git a/toontown/shtiker/ShardPage.py b/toontown/shtiker/ShardPage.py index 01063d2..9525cc3 100644 --- a/toontown/shtiker/ShardPage.py +++ b/toontown/shtiker/ShardPage.py @@ -9,6 +9,7 @@ from toontown.hood import ZoneUtil from toontown.toonbase import ToontownGlobals from toontown.distributed import ToontownDistrictStats from toontown.toontowngui import TTDialog +import functools POP_COLORS_NTT = (Vec4(0.0, 1.0, 0.0, 1.0), Vec4(1.0, 1.0, 0.0, 1.0), Vec4(1.0, 0.0, 0.0, 1.0)) POP_COLORS = (Vec4(0.4, 0.4, 1.0, 1.0), Vec4(0.4, 1.0, 0.4, 1.0), Vec4(1.0, 0.4, 0.4, 1.0)) @@ -181,7 +182,7 @@ class ShardPage(ShtikerPage.ShtikerPage): else: return 0 - curShardTuples.sort(compareShardTuples) + curShardTuples.sort(key=functools.cmp_to_key(compareShardTuples)) if base.cr.welcomeValleyManager: curShardTuples.append((ToontownGlobals.WelcomeValleyToken, TTLocalizer.WelcomeValley[-1],