From d4865731b09b6538efef948022205779090e75d5 Mon Sep 17 00:00:00 2001 From: John Cote Date: Thu, 1 Jul 2021 16:02:26 -0400 Subject: [PATCH] launcher: Almost done --- otp/launcher/DummyLauncherBase.py | 25 ------------------- otp/launcher/LauncherBase.py | 4 ++- toontown/launcher/ToontownDummyLauncher.py | 29 ---------------------- 3 files changed, 3 insertions(+), 55 deletions(-) diff --git a/otp/launcher/DummyLauncherBase.py b/otp/launcher/DummyLauncherBase.py index 33f4378..ef76e30 100644 --- a/otp/launcher/DummyLauncherBase.py +++ b/otp/launcher/DummyLauncherBase.py @@ -1,8 +1,5 @@ from pandac.PandaModules import * -import string from direct.showbase.MessengerGlobal import * -from direct.showbase.DirectObject import DirectObject -from direct.showbase.EventManagerGlobal import * from direct.task.TaskManagerGlobal import * from direct.task.Task import Task @@ -16,11 +13,7 @@ class DummyLauncherBase: self.phaseComplete[phase] = 0 self.firstPhase = self.LauncherPhases[0] - self.finalPhase = self.LauncherPhases[-1] - self.launcherFileDbHash = HashVal() - self.serverDbFileHash = HashVal() self.setPandaErrorCode(0) - self.setServerVersion('dev') def isDummy(self): return 1 @@ -39,9 +32,6 @@ class DummyLauncherBase: def isTestServer(self): return base.config.GetBool('is-test-server', 0) - def setPhaseCompleteArray(self, newPhaseComplete): - self.phaseComplete = newPhaseComplete - def setPhaseComplete(self, phase, percent): self.phaseComplete[phase] = percent @@ -65,18 +55,6 @@ class DummyLauncherBase: self.disconnectCode = newCode self.disconnectMsg = newMsg - def setServerVersion(self, version): - self.ServerVersion = version - - def getServerVersion(self): - return self.ServerVersion - - def getIsNewInstallation(self): - return base.config.GetBool('new-installation', 0) - - def setIsNotNewInstallation(self): - pass - def getLastLogin(self): if hasattr(self, 'lastLogin'): return self.lastLogin @@ -94,9 +72,6 @@ class DummyLauncherBase: def getGameServer(self): return '206.16.11.19' - def getAccountServer(self): - return '' - def getDeployment(self): return 'US' diff --git a/otp/launcher/LauncherBase.py b/otp/launcher/LauncherBase.py index 28e3e44..b817366 100644 --- a/otp/launcher/LauncherBase.py +++ b/otp/launcher/LauncherBase.py @@ -42,6 +42,7 @@ class LauncherBase(DirectObject): def __init__(self): self.started = False self.taskMgrStarted = False + self._downloadComplete = True self.pandaErrorCode = 0 ltime = time.localtime() logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000, @@ -122,6 +123,7 @@ class LauncherBase(DirectObject): self.background() builtins.launcher = self self.startGame() + self.cleanup() def _runTaskManager(self): if not self.taskMgrStarted: @@ -170,7 +172,7 @@ class LauncherBase(DirectObject): sys.exit() def isDownloadComplete(self): - return True + return self._downloadComplete def launcherMessage(self, msg): if msg != self.lastLauncherMsg: diff --git a/toontown/launcher/ToontownDummyLauncher.py b/toontown/launcher/ToontownDummyLauncher.py index 19fd6b9..fc5d779 100644 --- a/toontown/launcher/ToontownDummyLauncher.py +++ b/toontown/launcher/ToontownDummyLauncher.py @@ -10,36 +10,13 @@ class ToontownDummyLauncher(DummyLauncherBase, ToontownLauncher): self.setPhaseComplete(1, 100) self.setPhaseComplete(2, 100) self.setPhaseComplete(3, 100) - self.tutorialComplete = 1 - self.frequency = 0.0 self.windowOpen = 0 self.firstPhase = 3.5 - self.pandaErrorCodeKey = 'PANDA_ERROR_CODE' self.goUserName = '' self.periodTimeRemainingKey = 'PERIOD_TIME_REMAINING' - self.periodNameKey = 'PERIOD_NAME' - self.swidKey = 'SWID' self.reg = {} self.startFakeDownload() - def setTutorialComplete(self, complete): - self.tutorialComplete = complete - - def getTutorialComplete(self): - return self.tutorialComplete - - def setFrequency(self, freq): - self.frequency = freq - - def getFrequency(self): - return self.frequency - - def getInstallDir(self): - return 'C:\\Program Files\\Disney\\Disney Online\\Toontown' - - def getUserName(self): - return 'dummy' - def getReferrerCode(self): return None @@ -61,12 +38,6 @@ class ToontownDummyLauncher(DummyLauncherBase, ToontownLauncher): def recordPeriodTimeRemaining(self, secondsRemaining): self.setRegistry(self.periodTimeRemainingKey, secondsRemaining) - def recordPeriodName(self, periodName): - self.setRegistry(self.periodNameKey, periodName) - - def recordSwid(self, swid): - self.setRegistry(self.swidKey, swid) - def getGoUserName(self): return self.goUserName