launcher: Almost done

This commit is contained in:
John Cote 2021-07-01 16:02:26 -04:00
parent acc1d7165b
commit d4865731b0
3 changed files with 3 additions and 55 deletions

View file

@ -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'

View file

@ -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:

View file

@ -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