general: some cleanup

This commit is contained in:
John Cote 2019-11-28 00:17:22 -05:00
parent 17ba625f73
commit 9f56161955
19 changed files with 76 additions and 27 deletions

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI
class AccountAI(DistributedObjectAI): class AccountAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('AccountAI') notify = DirectNotifyGlobal.directNotify.newCategory('AccountAI')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD from direct.distributed.DistributedObjectUD import DistributedObjectUD
class AccountUD(DistributedObjectUD): class AccountUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory('AccountUD') notify = DirectNotifyGlobal.directNotify.newCategory('AccountUD')

View file

@ -1,5 +1,6 @@
from direct.distributed import DistributedObject from direct.distributed import DistributedObject
class AstronAccount(DistributedObject.DistributedObject): class AstronAccount(DistributedObject.DistributedObject):
def __init__(self, cr): def __init__(self, cr):

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI
class AstronAccountAI(DistributedObjectAI): class AstronAccountAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('AstronAccountAI') notify = DirectNotifyGlobal.directNotify.newCategory('AstronAccountAI')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD from direct.distributed.DistributedObjectUD import DistributedObjectUD
class AstronAccountUD(DistributedObjectUD): class AstronAccountUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory('AstronAccountUD') notify = DirectNotifyGlobal.directNotify.newCategory('AstronAccountUD')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI
class CentralLoggerAI(DistributedObjectAI): class CentralLoggerAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('CentralLoggerAI') notify = DirectNotifyGlobal.directNotify.newCategory('CentralLoggerAI')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD from direct.distributed.DistributedObjectUD import DistributedObjectUD
class CentralLoggerUD(DistributedObjectUD): class CentralLoggerUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory('CentralLoggerUD') notify = DirectNotifyGlobal.directNotify.newCategory('CentralLoggerUD')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedDirectoryAI(DistributedObjectAI): class DistributedDirectoryAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDirectoryAI') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDirectoryAI')

View file

@ -1,6 +1,7 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedDistrictAI(DistributedObjectAI): class DistributedDistrictAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDistrictAI') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDistrictAI')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD from direct.distributed.DistributedObjectUD import DistributedObjectUD
class DistributedDistrictUD(DistributedObjectUD): class DistributedDistrictUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDistrictUD') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedDistrictUD')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedTestObjectAI(DistributedObjectAI): class DistributedTestObjectAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTestObjectAI') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTestObjectAI')

View file

@ -1,6 +1,7 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.AstronInternalRepository import AstronInternalRepository from direct.distributed.AstronInternalRepository import AstronInternalRepository
# TODO: Remove Astron dependence. # TODO: Remove Astron dependence.
class OTPInternalRepository(AstronInternalRepository): class OTPInternalRepository(AstronInternalRepository):
@ -8,7 +9,8 @@ class OTPInternalRepository(AstronInternalRepository):
dbId = 4003 dbId = 4003
def __init__(self, baseChannel, serverId, dcFileNames, dcSuffix, connectMethod, threadedNet): def __init__(self, baseChannel, serverId, dcFileNames, dcSuffix, connectMethod, threadedNet):
AstronInternalRepository.__init__(self, baseChannel, serverId=serverId, dcFileNames=dcFileNames, dcSuffix=dcSuffix, connectMethod=connectMethod, threadedNet=threadedNet) AstronInternalRepository.__init__(self, baseChannel, serverId=serverId, dcFileNames=dcFileNames,
dcSuffix=dcSuffix, connectMethod=connectMethod, threadedNet=threadedNet)
def handleConnected(self): def handleConnected(self):
AstronInternalRepository.handleConnected(self) AstronInternalRepository.handleConnected(self)

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI
class ObjectServerAI(DistributedObjectAI): class ObjectServerAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('ObjectServerAI') notify = DirectNotifyGlobal.directNotify.newCategory('ObjectServerAI')

View file

@ -1,5 +1,6 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectUD import DistributedObjectUD from direct.distributed.DistributedObjectUD import DistributedObjectUD
class ObjectServerUD(DistributedObjectUD): class ObjectServerUD(DistributedObjectUD):
notify = DirectNotifyGlobal.directNotify.newCategory('ObjectServerUD') notify = DirectNotifyGlobal.directNotify.newCategory('ObjectServerUD')

View file

@ -4,8 +4,10 @@ from datetime import datetime
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
from otp.uberdog.AccountDetailRecord import AccountDetailRecord from otp.uberdog.AccountDetailRecord import AccountDetailRecord
class AstronLoginManager(DistributedObjectGlobal): class AstronLoginManager(DistributedObjectGlobal):
notify = DirectNotifyGlobal.directNotify.newCategory('AstronLoginManager') notify = DirectNotifyGlobal.directNotify.newCategory('AstronLoginManager')

View file

@ -2,15 +2,17 @@ import anydbm
import dumbdbm import dumbdbm
import json import json
import sys import sys
from datetime import datetime
import time import time
from datetime import datetime
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
from direct.distributed.PyDatagram import * from direct.distributed.PyDatagram import *
from toontown.makeatoon.NameGenerator import NameGenerator
from toontown.toon.ToonDNA import ToonDNA from toontown.toon.ToonDNA import ToonDNA
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer
from toontown.makeatoon.NameGenerator import NameGenerator
class AccountDB: class AccountDB:
""" """
@ -89,7 +91,8 @@ class LoginOperation:
self.__handleCreateAccount() self.__handleCreateAccount()
def __handleRetrieveAccount(self): def __handleRetrieveAccount(self):
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.accountId, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.accountId,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -107,7 +110,9 @@ class LoginOperation:
'LAST_LOGIN': time.ctime(), 'LAST_LOGIN': time.ctime(),
'ACCOUNT_ID': str(self.databaseId)} 'ACCOUNT_ID': str(self.databaseId)}
self.loginManager.air.dbInterface.createObject(self.loginManager.air.dbId, self.loginManager.air.dclassesByName['AstronAccountUD'], self.account, self.__handleAccountCreated) self.loginManager.air.dbInterface.createObject(self.loginManager.air.dbId,
self.loginManager.air.dclassesByName['AstronAccountUD'],
self.account, self.__handleAccountCreated)
def __handleAccountCreated(self, accountId): def __handleAccountCreated(self, accountId):
if not accountId: if not accountId:
@ -130,7 +135,8 @@ class LoginOperation:
def __handleSetAccount(self): def __handleSetAccount(self):
# if somebody's already logged into this account, disconnect them # if somebody's already logged into this account, disconnect them
datagram = PyDatagram() datagram = PyDatagram()
datagram.addServerHeader(self.loginManager.GetAccountConnectionChannel(self.accountId), self.loginManager.air.ourChannel, CLIENTAGENT_EJECT) datagram.addServerHeader(self.loginManager.GetAccountConnectionChannel(self.accountId),
self.loginManager.air.ourChannel, CLIENTAGENT_EJECT)
datagram.addUint16(100) datagram.addUint16(100)
datagram.addString('This account has been logged in elsewhere.') datagram.addString('This account has been logged in elsewhere.')
self.loginManager.air.send(datagram) self.loginManager.air.send(datagram)
@ -144,7 +150,7 @@ class LoginOperation:
# set sender channel to represent account affiliation # set sender channel to represent account affiliation
datagram = PyDatagram() datagram = PyDatagram()
datagram.addServerHeader(self.sender, self.loginManager.air.ourChannel, CLIENTAGENT_SET_CLIENT_ID) datagram.addServerHeader(self.sender, self.loginManager.air.ourChannel, CLIENTAGENT_SET_CLIENT_ID)
datagram.addChannel(self.accountId << 32) # accountId is in high 32 bits, 0 in low (no avatar). datagram.addChannel(self.accountId << 32) # accountId is in high 32 bits, 0 in low (no avatar).
self.loginManager.air.send(datagram) self.loginManager.air.send(datagram)
# set client state to established, thus un-sandboxing the sender # set client state to established, thus un-sandboxing the sender
@ -202,7 +208,8 @@ class GetAvatarsOperation:
self.avatarFields = None self.avatarFields = None
def start(self): def start(self):
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -221,6 +228,7 @@ class GetAvatarsOperation:
for avId in self.avList: for avId in self.avList:
if avId: if avId:
self.pendingAvatars.add(avId) self.pendingAvatars.add(avId)
def response(dclass, fields, avId=avId): def response(dclass, fields, avId=avId):
if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']: if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']:
# mayonnaise # mayonnaise
@ -289,7 +297,8 @@ class CreateAvatarOperation:
self.__handleRetrieveAccount() self.__handleRetrieveAccount()
def __handleRetrieveAccount(self): def __handleRetrieveAccount(self):
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -318,7 +327,9 @@ class CreateAvatarOperation:
'setDNAString': (self.avDNA,), 'setDNAString': (self.avDNA,),
'setDISLid': (self.sender,)} 'setDISLid': (self.sender,)}
self.loginManager.air.dbInterface.createObject(self.loginManager.air.dbId, self.loginManager.air.dclassesByName['DistributedToonUD'], toonFields, self.__handleToonCreated) self.loginManager.air.dbInterface.createObject(self.loginManager.air.dbId,
self.loginManager.air.dclassesByName['DistributedToonUD'],
toonFields, self.__handleToonCreated)
def __handleToonCreated(self, avId): def __handleToonCreated(self, avId):
if not avId: if not avId:
@ -330,10 +341,11 @@ class CreateAvatarOperation:
def __handleStoreAvatar(self): def __handleStoreAvatar(self):
self.avList[self.avPosition] = self.avId self.avList[self.avPosition] = self.avId
self.loginManager.air.dbInterface.updateObject(self.loginManager.air.dbId, self.sender, self.loginManager.air.dclassesByName['AstronAccountUD'], self.loginManager.air.dbInterface.updateObject(self.loginManager.air.dbId, self.sender,
{'ACCOUNT_AV_SET': self.avList}, self.loginManager.air.dclassesByName['AstronAccountUD'],
{'ACCOUNT_AV_SET': self.account['ACCOUNT_AV_SET']}, {'ACCOUNT_AV_SET': self.avList},
self.__handleAvatarStored) {'ACCOUNT_AV_SET': self.account['ACCOUNT_AV_SET']},
self.__handleAvatarStored)
def __handleAvatarStored(self, fields): def __handleAvatarStored(self, fields):
if fields: if fields:
@ -362,7 +374,8 @@ class SetNamePatternOperation:
self.__handleRetrieveAccount() self.__handleRetrieveAccount()
def __handleRetrieveAccount(self): def __handleRetrieveAccount(self):
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -381,7 +394,8 @@ class SetNamePatternOperation:
# It's you! # It's you!
return return
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId, self.__handleAvatarRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId,
self.__handleAvatarRetrieved)
def __handleAvatarRetrieved(self, dclass, fields): def __handleAvatarRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']: if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']:
@ -413,7 +427,8 @@ class SetNamePatternOperation:
name = ' '.join(parts) name = ' '.join(parts)
self.loginManager.air.dbInterface.updateObject(self.loginManager.air.dbId, self.avId, self.loginManager.air.dclassesByName['DistributedToonUD'], self.loginManager.air.dbInterface.updateObject(self.loginManager.air.dbId, self.avId,
self.loginManager.air.dclassesByName['DistributedToonUD'],
{'WishNameState': ('LOCKED',), {'WishNameState': ('LOCKED',),
'WishName': ('',), 'WishName': ('',),
'setName': (name,)}) 'setName': (name,)})
@ -441,7 +456,8 @@ class SetNameTypedOperation:
self.__handleJudgeName() self.__handleJudgeName()
def __handleRetrieveAccount(self): def __handleRetrieveAccount(self):
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -460,7 +476,8 @@ class SetNameTypedOperation:
# Hahaha # Hahaha
return return
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId, self.__handleAvatarRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId,
self.__handleAvatarRetrieved)
def __handleAvatarRetrieved(self, dclass, fields): def __handleAvatarRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']: if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']:
@ -500,7 +517,8 @@ class AcknowledgeNameOperation:
self.__handleRetrieveAccount() self.__handleRetrieveAccount()
def __handleRetrieveAccount(self): def __handleRetrieveAccount(self):
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -518,7 +536,8 @@ class AcknowledgeNameOperation:
# welp # welp
return return
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId, self.__handleAvatarRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId,
self.__handleAvatarRetrieved)
def __handleAvatarRetrieved(self, dclass, fields): def __handleAvatarRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']: if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']:
@ -564,7 +583,8 @@ class RemoveAvatarOperation:
def start(self, avId): def start(self, avId):
self.avId = avId self.avId = avId
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -593,7 +613,8 @@ class RemoveAvatarOperation:
{'setSlot%sToonId' % index: [0], {'setSlot%sToonId' % index: [0],
'setSlot%sItems' % index: [[]]}) 'setSlot%sItems' % index: [[]]})
self.loginManager.air.dbInterface.updateObject(self.loginManager.air.dbId, self.sender, self.loginManager.air.dclassesByName['AstronAccountUD'], self.loginManager.air.dbInterface.updateObject(self.loginManager.air.dbId, self.sender,
self.loginManager.air.dclassesByName['AstronAccountUD'],
{'ACCOUNT_AV_SET': self.avList, {'ACCOUNT_AV_SET': self.avList,
'ACCOUNT_AV_SET_DEL': avatarsRemoved}, 'ACCOUNT_AV_SET_DEL': avatarsRemoved},
{'ACCOUNT_AV_SET': self.account['ACCOUNT_AV_SET'], {'ACCOUNT_AV_SET': self.account['ACCOUNT_AV_SET'],
@ -613,6 +634,7 @@ class RemoveAvatarOperation:
for avId in self.avList: for avId in self.avList:
if avId: if avId:
self.pendingAvatars.add(avId) self.pendingAvatars.add(avId)
def response(dclass, fields, avId=avId): def response(dclass, fields, avId=avId):
if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']: if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']:
# mayonnaise # mayonnaise
@ -669,7 +691,8 @@ class LoadAvatarOperation:
self.__handleRetrieveAccount() self.__handleRetrieveAccount()
def __handleRetrieveAccount(self): def __handleRetrieveAccount(self):
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender, self.__handleAccountRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.sender,
self.__handleAccountRetrieved)
def __handleAccountRetrieved(self, dclass, fields): def __handleAccountRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']: if dclass != self.loginManager.air.dclassesByName['AstronAccountUD']:
@ -686,7 +709,8 @@ class LoadAvatarOperation:
if self.avId not in self.avList: if self.avId not in self.avList:
return return
self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId, self.__handleAvatarRetrieved) self.loginManager.air.dbInterface.queryObject(self.loginManager.air.dbId, self.avId,
self.__handleAvatarRetrieved)
def __handleAvatarRetrieved(self, dclass, fields): def __handleAvatarRetrieved(self, dclass, fields):
if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']: if dclass != self.loginManager.air.dclassesByName['DistributedToonUD']:

View file

@ -1,8 +1,11 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from otp.login.LoginScreen import LoginScreen
from direct.distributed.MsgTypes import * from direct.distributed.MsgTypes import *
from otp.login.LoginScreen import LoginScreen
class AstronLoginScreen(LoginScreen): class AstronLoginScreen(LoginScreen):
notify = DirectNotifyGlobal.directNotify.newCategory('AstronLoginScreen')
def handleWaitForLoginResponse(self, msgType, di): def handleWaitForLoginResponse(self, msgType, di):
if msgType == CLIENT_HELLO_RESP: if msgType == CLIENT_HELLO_RESP:

View file

@ -1,11 +1,14 @@
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
from otp.distributed.DistributedDirectoryAI import DistributedDirectoryAI from otp.distributed.DistributedDirectoryAI import DistributedDirectoryAI
from otp.distributed.OtpDoGlobals import * from otp.distributed.OtpDoGlobals import *
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
# TODO: Remove Astron dependence. # TODO: Remove Astron dependence.
class ToontownUDRepository(ToontownInternalRepository): class ToontownUDRepository(ToontownInternalRepository):
notify = DirectNotifyGlobal.directNotify.newCategory('ToontownUDRepository')
def __init__(self, baseChannel, serverId): def __init__(self, baseChannel, serverId):
ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='UD') ToontownInternalRepository.__init__(self, baseChannel, serverId, dcSuffix='UD')

View file

@ -1,9 +1,11 @@
import __builtin__ import __builtin__
class game: class game:
name = 'uberDog' name = 'uberDog'
process = 'server' process = 'server'
__builtin__.game = game __builtin__.game = game
from panda3d.core import * from panda3d.core import *