This commit is contained in:
bobbybee 2014-08-14 17:26:41 -04:00
parent f1e705fc3b
commit 4274450c3f
2 changed files with 13 additions and 0 deletions

View File

@ -421,3 +421,13 @@ class AstronInternalRepository(ConnectionRepository):
for arg in args:
dg.addString(str(arg))
self.eventSocket.Send(dg.getMessage())
def setAI(self, doID, aiChannel):
"""
Sets the AI of the specified DistributedObjectAI to be the specified channel.
Generally, you should not call this method, and instead call DistributedObjectAI.setAI.
"""
dg = PyDatagram()
dg.addServerHeader(doID, aiChannel, MsgTypes.STATESERVER_OBJECT_SET_AI)
dg.add_uint64(aiChannel)
dg.send(dg)

View File

@ -568,4 +568,7 @@ class DistributedObjectAI(DistributedObjectBase):
def _retrieveCachedData(self):
""" This is a no-op on the AI. """
pass
def setAI(self, aiChannel):
self.air.setAI(self.doId, aiChannel)