diff --git a/deployment/public_client.prc b/deployment/public_client.prc index abae39fa..c53b4bc5 100644 --- a/deployment/public_client.prc +++ b/deployment/public_client.prc @@ -3,7 +3,7 @@ # Config.prc should be reproduced here. # Client settings -window-title Toontown Stride +window-title Toontown Stride [Alpha] server-version SERVER_VERSION_HERE video-library-name p3ffmpeg want-dev #f @@ -50,7 +50,7 @@ want-chinese-checkers #t want-checkers #t want-house-types #t want-gifting #t -want-top-toons #f +want-top-toons #t want-language-selection #t estate-day-night #t want-mat-all-tailors #t diff --git a/deployment/server.prc b/deployment/server.prc index 657b5f75..5ff5390a 100644 --- a/deployment/server.prc +++ b/deployment/server.prc @@ -20,7 +20,7 @@ want-chinese-checkers #t want-checkers #t want-house-types #t want-gifting #t -want-top-toons #f +want-top-toons #t want-language-selection #t estate-day-night #t want-mat-all-tailors #t diff --git a/toontown/distributed/ToontownInternalRepository.py b/toontown/distributed/ToontownInternalRepository.py index 40a65d40..327292d2 100755 --- a/toontown/distributed/ToontownInternalRepository.py +++ b/toontown/distributed/ToontownInternalRepository.py @@ -21,13 +21,19 @@ class ToontownInternalRepository(AstronInternalRepository): self.__messenger = ToontownNetMessengerAI(self) if self.wantMongo: import pymongo - self.dbConn = pymongo.MongoClient(config.GetString('mongodb-url', 'localhost')) - self.dbGlobalCursor = self.dbConn.toontownstride - self.dbCursor = self.dbGlobalCursor['air-%d' % self.ourChannel] + mongourl = config.GetString('mongodb-url', 'mongodb://localhost') + replicaset = config.GetString('mongodb-replicaset', '') + db = (urlparse.urlparse(mongourl).path or '/Astron_Dev')[1:] + if replicaset: + self.dbConn = pymongo.MongoClient(mongourl, replicaset=replicaset) + else: + self.dbConn = pymongo.MongoClient(mongourl) + self.database = self.dbConn[db] + self.dbGlobalCursor = self.database.toontownstride else: self.dbConn = None + self.database = None self.dbGlobalCursor = None - self.dbCursor = None def sendNetEvent(self, message, sentArgs=[]): self.__messenger.send(message, sentArgs) diff --git a/toontown/toonbase/ToonBase.py b/toontown/toonbase/ToonBase.py index e4aa8e80..52f7a1bb 100755 --- a/toontown/toonbase/ToonBase.py +++ b/toontown/toonbase/ToonBase.py @@ -27,6 +27,21 @@ from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownBattleGlobals from toontown.toontowngui import TTDialog +tempdir = tempfile.mkdtemp() +vfs = VirtualFileSystem.getGlobalPtr() +searchPath = DSearchPath() +if __debug__: + searchPath.appendDirectory(Filename('resources/phase_3/etc')) +searchPath.appendDirectory(Filename('/phase_3/etc')) + +for filename in ['toonmono.cur', 'icon.ico']: + p3filename = Filename(filename) + found = vfs.resolveFilename(p3filename, searchPath) + if not found: + continue + with open(os.path.join(tempdir, filename), 'wb') as f: + f.write(vfs.readFile(p3filename, False)) +loadPrcFileData('Window: icon', 'icon-filename %s' % Filename.fromOsSpecific(os.path.join(tempdir, 'icon.ico'))) class ToonBase(OTPBase.OTPBase): notify = DirectNotifyGlobal.directNotify.newCategory('ToonBase') @@ -148,23 +163,7 @@ class ToonBase(OTPBase.OTPBase): return result def setCursorAndIcon(self): - tempdir = tempfile.mkdtemp() atexit.register(shutil.rmtree, tempdir) - vfs = VirtualFileSystem.getGlobalPtr() - - searchPath = DSearchPath() - if __debug__: - searchPath.appendDirectory(Filename('resources/phase_3/etc')) - searchPath.appendDirectory(Filename('/phase_3/etc')) - - for filename in ['toonmono.cur', 'icon.ico']: - p3filename = Filename(filename) - found = vfs.resolveFilename(p3filename, searchPath) - if not found: - return # Can't do anything past this point. - - with open(os.path.join(tempdir, filename), 'wb') as f: - f.write(vfs.readFile(p3filename, False)) wp = WindowProperties() wp.setCursorFilename(Filename.fromOsSpecific(os.path.join(tempdir, 'toonmono.cur'))) diff --git a/toontown/uberdog/ClientServicesManagerUD.py b/toontown/uberdog/ClientServicesManagerUD.py index bf873340..9402d17e 100755 --- a/toontown/uberdog/ClientServicesManagerUD.py +++ b/toontown/uberdog/ClientServicesManagerUD.py @@ -275,7 +275,6 @@ class RemoteAccountDB: r = executeHttpRequest('associateuser', username=str(userId), accountId=str(accountId)) try: r = json.loads(r) - print r if r['success']: callback(True) else: