makeatoon: it loads
This commit is contained in:
parent
4ae4a6e3e4
commit
140f520d65
4 changed files with 34 additions and 10 deletions
|
@ -15,3 +15,7 @@ class AstronLoginManager(DistributedObjectGlobal):
|
|||
|
||||
def sendRequestLogin(self, playToken):
|
||||
self.sendUpdate('requestLogin', [playToken])
|
||||
|
||||
def loginResponse(self, responseBlob):
|
||||
# TODO HANDLE THIS PROPERLY
|
||||
messenger.send(self.doneEvent, [{'mode': 'success'}])
|
||||
|
|
|
@ -1,8 +1,34 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
|
||||
from direct.distributed.PyDatagram import *
|
||||
|
||||
class AstronLoginManagerUD(DistributedObjectGlobalUD):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('AstronLoginManagerUD')
|
||||
|
||||
def requestLogin(self, playToken):
|
||||
print playToken
|
||||
# TODO SET THIS UP PROPERLY.
|
||||
# AT THE MOMENT EVERYTHING IS HARDCODED
|
||||
# THIS IS JUST TO GET TO THE PICK A TOON SCREEN
|
||||
|
||||
# get the sender
|
||||
sender = self.air.getMsgSender()
|
||||
|
||||
# add connection to account channel
|
||||
datagram = PyDatagram()
|
||||
datagram.addServerHeader(sender, self.air.ourChannel, CLIENTAGENT_OPEN_CHANNEL)
|
||||
datagram.addChannel(self.GetAccountConnectionChannel(1000000000))
|
||||
self.air.send(datagram)
|
||||
|
||||
# set sender channel to represent account affiliation
|
||||
datagram = PyDatagram()
|
||||
datagram.addServerHeader(sender, self.air.ourChannel, CLIENTAGENT_SET_CLIENT_ID)
|
||||
datagram.addChannel(1000000000 << 32) # accountId is in high 32 bits, 0 in low (no avatar).
|
||||
self.air.send(datagram)
|
||||
|
||||
# set client state to established, thus un-sandboxing the sender
|
||||
self.air.setClientState(sender, 2)
|
||||
|
||||
# send dummy login response
|
||||
import json
|
||||
a = json.dumps({})
|
||||
self.sendUpdateToChannel(sender, 'loginResponse', [a])
|
||||
|
|
|
@ -228,7 +228,7 @@ class MakeAToon(StateData.StateData):
|
|||
self.spotlight.setHpr(0, 0, 0)
|
||||
smokeSeqNode = SequenceNode('smoke')
|
||||
smokeModel = loader.loadModel('phase_3/models/makeatoon/tt_m_ara_mat_smoke')
|
||||
smokeFrameList = smokeModel.findAllMatches('**/smoke_*').asList()
|
||||
smokeFrameList = list(smokeModel.findAllMatches('**/smoke_*'))
|
||||
smokeFrameList.reverse()
|
||||
for smokeFrame in smokeFrameList:
|
||||
smokeSeqNode.addChild(smokeFrame.node())
|
||||
|
|
|
@ -5,7 +5,6 @@ import copy
|
|||
from toontown.toonbase import ToontownGlobals
|
||||
from toontown.toonbase import TTLocalizer
|
||||
import os
|
||||
from direct.showbase import AppRunnerGlobal
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
|
||||
class NameGenerator:
|
||||
|
@ -37,13 +36,8 @@ class NameGenerator:
|
|||
self.lastSuffixes = []
|
||||
self.nameDictionary = {}
|
||||
searchPath = DSearchPath()
|
||||
if AppRunnerGlobal.appRunner:
|
||||
searchPath.appendDirectory(Filename.expandFrom('$TT_3_ROOT/phase_3/etc'))
|
||||
else:
|
||||
searchPath.appendDirectory(Filename('phase_3/etc'))
|
||||
base = os.path.expandvars('$TOONTOWN') or './toontown'
|
||||
searchPath.appendDirectory(Filename.fromOsSpecific(os.path.expandvars(base + '/src/configfiles')))
|
||||
searchPath.appendDirectory(Filename('.'))
|
||||
if __debug__:
|
||||
searchPath.appendDirectory(Filename('resources/phase_3/etc'))
|
||||
filename = Filename(TTLocalizer.NameShopNameMaster)
|
||||
found = vfs.resolveFilename(filename, searchPath)
|
||||
if not found:
|
||||
|
|
Loading…
Reference in a new issue