mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 03:35:12 -06:00
Merge branch 'feature/deployment' of Repo.Ez-webz.com:Stride/src into feature/deployment
This commit is contained in:
commit
61b8cc4fd3
5 changed files with 28 additions and 24 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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')))
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue