launcher: Almost done
This commit is contained in:
parent
acc1d7165b
commit
d4865731b0
3 changed files with 3 additions and 55 deletions
|
@ -1,8 +1,5 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
import string
|
|
||||||
from direct.showbase.MessengerGlobal import *
|
from direct.showbase.MessengerGlobal import *
|
||||||
from direct.showbase.DirectObject import DirectObject
|
|
||||||
from direct.showbase.EventManagerGlobal import *
|
|
||||||
from direct.task.TaskManagerGlobal import *
|
from direct.task.TaskManagerGlobal import *
|
||||||
from direct.task.Task import Task
|
from direct.task.Task import Task
|
||||||
|
|
||||||
|
@ -16,11 +13,7 @@ class DummyLauncherBase:
|
||||||
self.phaseComplete[phase] = 0
|
self.phaseComplete[phase] = 0
|
||||||
|
|
||||||
self.firstPhase = self.LauncherPhases[0]
|
self.firstPhase = self.LauncherPhases[0]
|
||||||
self.finalPhase = self.LauncherPhases[-1]
|
|
||||||
self.launcherFileDbHash = HashVal()
|
|
||||||
self.serverDbFileHash = HashVal()
|
|
||||||
self.setPandaErrorCode(0)
|
self.setPandaErrorCode(0)
|
||||||
self.setServerVersion('dev')
|
|
||||||
|
|
||||||
def isDummy(self):
|
def isDummy(self):
|
||||||
return 1
|
return 1
|
||||||
|
@ -39,9 +32,6 @@ class DummyLauncherBase:
|
||||||
def isTestServer(self):
|
def isTestServer(self):
|
||||||
return base.config.GetBool('is-test-server', 0)
|
return base.config.GetBool('is-test-server', 0)
|
||||||
|
|
||||||
def setPhaseCompleteArray(self, newPhaseComplete):
|
|
||||||
self.phaseComplete = newPhaseComplete
|
|
||||||
|
|
||||||
def setPhaseComplete(self, phase, percent):
|
def setPhaseComplete(self, phase, percent):
|
||||||
self.phaseComplete[phase] = percent
|
self.phaseComplete[phase] = percent
|
||||||
|
|
||||||
|
@ -65,18 +55,6 @@ class DummyLauncherBase:
|
||||||
self.disconnectCode = newCode
|
self.disconnectCode = newCode
|
||||||
self.disconnectMsg = newMsg
|
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):
|
def getLastLogin(self):
|
||||||
if hasattr(self, 'lastLogin'):
|
if hasattr(self, 'lastLogin'):
|
||||||
return self.lastLogin
|
return self.lastLogin
|
||||||
|
@ -94,9 +72,6 @@ class DummyLauncherBase:
|
||||||
def getGameServer(self):
|
def getGameServer(self):
|
||||||
return '206.16.11.19'
|
return '206.16.11.19'
|
||||||
|
|
||||||
def getAccountServer(self):
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def getDeployment(self):
|
def getDeployment(self):
|
||||||
return 'US'
|
return 'US'
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ class LauncherBase(DirectObject):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.started = False
|
self.started = False
|
||||||
self.taskMgrStarted = False
|
self.taskMgrStarted = False
|
||||||
|
self._downloadComplete = True
|
||||||
self.pandaErrorCode = 0
|
self.pandaErrorCode = 0
|
||||||
ltime = time.localtime()
|
ltime = time.localtime()
|
||||||
logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000,
|
logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000,
|
||||||
|
@ -122,6 +123,7 @@ class LauncherBase(DirectObject):
|
||||||
self.background()
|
self.background()
|
||||||
builtins.launcher = self
|
builtins.launcher = self
|
||||||
self.startGame()
|
self.startGame()
|
||||||
|
self.cleanup()
|
||||||
|
|
||||||
def _runTaskManager(self):
|
def _runTaskManager(self):
|
||||||
if not self.taskMgrStarted:
|
if not self.taskMgrStarted:
|
||||||
|
@ -170,7 +172,7 @@ class LauncherBase(DirectObject):
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
def isDownloadComplete(self):
|
def isDownloadComplete(self):
|
||||||
return True
|
return self._downloadComplete
|
||||||
|
|
||||||
def launcherMessage(self, msg):
|
def launcherMessage(self, msg):
|
||||||
if msg != self.lastLauncherMsg:
|
if msg != self.lastLauncherMsg:
|
||||||
|
|
|
@ -10,36 +10,13 @@ class ToontownDummyLauncher(DummyLauncherBase, ToontownLauncher):
|
||||||
self.setPhaseComplete(1, 100)
|
self.setPhaseComplete(1, 100)
|
||||||
self.setPhaseComplete(2, 100)
|
self.setPhaseComplete(2, 100)
|
||||||
self.setPhaseComplete(3, 100)
|
self.setPhaseComplete(3, 100)
|
||||||
self.tutorialComplete = 1
|
|
||||||
self.frequency = 0.0
|
|
||||||
self.windowOpen = 0
|
self.windowOpen = 0
|
||||||
self.firstPhase = 3.5
|
self.firstPhase = 3.5
|
||||||
self.pandaErrorCodeKey = 'PANDA_ERROR_CODE'
|
|
||||||
self.goUserName = ''
|
self.goUserName = ''
|
||||||
self.periodTimeRemainingKey = 'PERIOD_TIME_REMAINING'
|
self.periodTimeRemainingKey = 'PERIOD_TIME_REMAINING'
|
||||||
self.periodNameKey = 'PERIOD_NAME'
|
|
||||||
self.swidKey = 'SWID'
|
|
||||||
self.reg = {}
|
self.reg = {}
|
||||||
self.startFakeDownload()
|
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):
|
def getReferrerCode(self):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -61,12 +38,6 @@ class ToontownDummyLauncher(DummyLauncherBase, ToontownLauncher):
|
||||||
def recordPeriodTimeRemaining(self, secondsRemaining):
|
def recordPeriodTimeRemaining(self, secondsRemaining):
|
||||||
self.setRegistry(self.periodTimeRemainingKey, 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):
|
def getGoUserName(self):
|
||||||
return self.goUserName
|
return self.goUserName
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue