general: More Astron progress
This commit is contained in:
parent
bba3117cc4
commit
2dcf73d3da
3 changed files with 45 additions and 5 deletions
|
@ -520,7 +520,8 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
return
|
||||
|
||||
self.startReaderPollTask()
|
||||
self.startHeartbeat()
|
||||
if not self.astronSupport:
|
||||
self.startHeartbeat()
|
||||
newInstall = launcher.getIsNewInstallation()
|
||||
newInstall = base.config.GetBool('new-installation', newInstall)
|
||||
if newInstall:
|
||||
|
@ -1933,6 +1934,35 @@ class OTPClientRepository(ClientRepositoryBase):
|
|||
if self.astronSupport:
|
||||
if msgType == CLIENT_EJECT:
|
||||
self.handleGoGetLost(di)
|
||||
elif msgType == CLIENT_HEARTBEAT:
|
||||
self.handleServerHeartbeat(di)
|
||||
elif msgtype == CLIENT_ENTER_OBJECT_REQUIRED:
|
||||
self.handleGenerateWithRequired(di)
|
||||
elif msgType == CLIENT_ENTER_OBJECT_REQUIRED_OTHER:
|
||||
self.handleGenerateWithRequiredOther(di)
|
||||
elif msgType == CLIENT_ENTER_OBJECT_REQUIRED_OTHER_OWNER:
|
||||
self.handleGenerateWithRequiredOtherOwner(di)
|
||||
elif msgType == CLIENT_OBJECT_SET_FIELD:
|
||||
self.handleUpdateField(di)
|
||||
elif msgType == CLIENT_OBJECT_LEAVING:
|
||||
self.handleDisable(di)
|
||||
elif msgType == CLIENT_OBJECT_LEAVING_OWNER:
|
||||
self.handleDisable(di, ownerView=True)
|
||||
elif msgType == CLIENT_DONE_INTEREST_RESP:
|
||||
self.gotInterestDoneMessage(di)
|
||||
elif msgType == CLIENT_OBJECT_LOCATION:
|
||||
self.gotObjectLocationMessage(di)
|
||||
else:
|
||||
currentLoginState = self.loginFSM.getCurrentState()
|
||||
if currentLoginState:
|
||||
currentLoginStateName = currentLoginState.getName()
|
||||
else:
|
||||
currentLoginStateName = 'None'
|
||||
currentGameState = self.gameFSM.getCurrentState()
|
||||
if currentGameState:
|
||||
currentGameStateName = currentGameState.getName()
|
||||
else:
|
||||
currentGameStateName = 'None'
|
||||
else:
|
||||
if msgType == CLIENT_GO_GET_LOST:
|
||||
self.handleGoGetLost(di)
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.login.LoginScreen import LoginScreen
|
||||
from direct.distributed.MsgTypes import *
|
||||
|
||||
class AstronLoginScreen(LoginScreen):
|
||||
def handleWaitForLoginResponse(self, msgType, di):
|
||||
self.cr.handleMessageType(msgType, di)
|
||||
if msgType == CLIENT_HELLO_RESP:
|
||||
# Now we can start the heartbeat:
|
||||
self.cr.startHeartbeat()
|
||||
else:
|
||||
self.cr.handleMessageType(msgType, di)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.login.LoginBase import LoginBase
|
||||
from direct.distributed.PyDatagram import PyDatagram
|
||||
from direct.distributed.MsgTypes import *
|
||||
|
||||
class LoginAstronAccount(LoginBase):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('LoginAstronAccount')
|
||||
|
@ -8,11 +10,14 @@ class LoginAstronAccount(LoginBase):
|
|||
LoginBase.__init__(self, cr)
|
||||
|
||||
def authorize(self, username, password):
|
||||
self.notify.info(username)
|
||||
self.notify.info(password)
|
||||
pass
|
||||
|
||||
def sendLoginMsg(self):
|
||||
self.notify.info('LOG ME IN!!!!!!!!!!!!')
|
||||
datagram = PyDatagram()
|
||||
datagram.addUint16(CLIENT_HELLO)
|
||||
datagram.addUint32(self.cr.hashVal)
|
||||
datagram.addString(self.cr.serverVersion)
|
||||
self.cr.send(datagram)
|
||||
|
||||
def supportsRelogin(self):
|
||||
if __debug__:
|
||||
|
|
Loading…
Reference in a new issue