direct.distributed.DistributedObjectAI

from direct.distributed.DistributedObjectAI import DistributedObjectAI

DistributedObjectAI module: contains the DistributedObjectAI class

Inheritance diagram

Inheritance diagram of direct.distributed.DistributedObjectAI

class DistributedObjectAI(air)[source]

Bases: direct.distributed.DistributedObjectBase.DistributedObjectBase

GetAccountConnectionChannel(self, doId)[source]
GetAccountIDFromChannelCode(self, channel)[source]
GetAvatarIDFromChannelCode(self, channel)[source]
GetPuppetConnectionChannel(self, doId)[source]
QuietZone = 1
__init__(self, air)[source]
announceGenerate(self)[source]

Called after the object has been generated and all of its required fields filled in. Overwrite when needed.

b_setLocation(self, parentId, zoneId)[source]
beginBarrier(self, name, avIds, timeout, callback)[source]
d_setLocation(self, parentId, zoneId)[source]
delete(self)[source]

Inheritors should redefine this to take appropriate action on delete Note that this may be called multiple times if a class inherits from DistributedObjectAI more than once.

deleteOrDelay(self)[source]

This method exists only to mirror the similar method on DistributedObject. AI objects don’t have delayDelete, they just get deleted immediately.

execCommand(self, string, mwMgrId, avId, zoneId)[source]
generate(self)[source]

Inheritors should put functions that require self.zoneId or other networked info in this function.

generateInit(self, repository=None)[source]

First generate (not from cache).

generateOtpObject(self, parentId, zoneId, optionalFields=[], doId=None)[source]
generateTargetChannel(self, repository)[source]

Who to send this to for generate messages

generateWithRequired(self, zoneId, optionalFields=[])[source]
generateWithRequiredAndId(self, doId, parentId, zoneId, optionalFields=[])[source]
getBarrierData(self)[source]
getCacheable(self)[source]

This method exists only to mirror the similar method on DistributedObject. AI objects aren’t cacheable.

getCollTrav(self, *args, **kArgs)[source]
getDelayDeleteCount(self)[source]
getDeleteEvent(self)[source]
getDoId(self)[source]

Return the distributed object id

getLocation(self)[source]
getLogicalZoneChangeEvent(self)[source]
getNonCollidableParent(self)[source]
getParentMgr(self)[source]
getRender(self)[source]
getZoneChangeEvent(self)[source]
getZoneData(self)[source]
handleLogicalZoneChange(self, newZoneId, oldZoneId)[source]

this function gets called as if we never go through the quiet zone. Note that it is called once you reach the newZone, and not at the time that you leave the oldZone.

ignoreBarrier(self, context)[source]
initFromServerResponse(self, valDict)[source]
isDeleted(self)[source]

Returns true if the object has been deleted, or if it is brand new and hasnt yet been generated.

isGenerated(self)[source]

Returns true if the object has been generated

isGridParent(self)[source]
notify = <direct.directnotify.Notifier.Notifier object>
postGenerateMessage(self)[source]
preAllocateDoId(self)[source]

objects that need to have a doId before they are generated can call this to pre-allocate a doId for the object

releaseZoneData(self)[source]
requestDelete(self)[source]
sendDeleteEvent(self)[source]
sendGenerateWithRequired(self, repository, parentId, zoneId, optionalFields=[])[source]
sendMessageBundle(self)[source]
sendUpdate(self, fieldName, args=[])[source]
sendUpdateToAccountId(self, accountId, fieldName, args)[source]
sendUpdateToAvatarId(self, avId, fieldName, args)[source]
sendUpdateToChannel(self, channelId, fieldName, args)[source]
setAI(self, aiChannel)[source]
setBarrierReady(self, context)[source]
setLocation(self, parentId, zoneId)[source]
startMessageBundle(self, name)[source]
staticGetLogicalZoneChangeEvent(doId)[source]
staticGetZoneChangeEvent(doId)[source]
status(self, indent=0)[source]
print out doId(parentId, zoneId) className

and conditionally show generated or deleted

taskName(self, taskString)[source]
uniqueName(self, idString)[source]
updateAllRequiredFields(self, dclass, di)[source]
updateAllRequiredOtherFields(self, dclass, di)[source]
updateRequiredFields(self, dclass, di)[source]
updateRequiredOtherFields(self, dclass, di)[source]
validate(self, avId, bool, msg)[source]