Poodletooth-iLand/toontown/estate/DistributedLawnDecorAI.py

41 lines
1.2 KiB
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedNodeAI import DistributedNodeAI
class DistributedLawnDecorAI(DistributedNodeAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedLawnDecorAI")
2015-07-20 14:53:53 -05:00
def __init__(self, mgr):
self.mgr = mgr
DistributedNodeAI.__init__(self, self.mgr.air)
self.plot = 0
self.ownerIndex = 0
2015-05-10 06:47:03 -05:00
def setPlot(self, plot):
2015-05-10 07:00:38 -05:00
self.plot = plot
2015-07-20 14:53:53 -05:00
2015-05-24 18:23:54 -05:00
def getPlot(self):
return self.plot
2015-03-03 16:10:12 -06:00
2015-05-24 18:23:54 -05:00
def getHeading(self):
2015-07-20 14:53:53 -05:00
return self.getH()
2015-05-24 18:23:54 -05:00
2015-07-20 14:53:53 -05:00
def getPosition(self):
return self.getPos()
2015-03-03 16:10:12 -06:00
2015-07-20 14:53:53 -05:00
def setOwnerIndex(self, ownerIndex):
self.ownerIndex = ownerIndex
self.ownerDoId = self.mgr.gardenMgr.mgr.toons[ownerIndex]
self.owner = self.air.doId2do.get(self.ownerDoId)
def getOwnerIndex(self):
return self.ownerIndex
2015-03-03 16:10:12 -06:00
2015-07-20 14:53:53 -05:00
def d_setMovie(self, mode, avId=None):
if avId is None:
avId = self.air.getAvatarIdFromSender()
2015-05-24 18:23:54 -05:00
self.sendUpdate('setMovie', [mode, avId])
2015-03-03 16:10:12 -06:00
2015-07-20 14:53:53 -05:00
def d_interactionDenied(self):
self.sendUpdate('interactionDenied', [self.air.getAvatarIdFromSender()])