Poodletooth-iLand/toontown/estate/DistributedLawnDecorAI.py

69 lines
1.6 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
2015-05-24 18:23:54 -05:00
import GardenGlobals
2015-03-03 16:10:12 -06:00
class DistributedLawnDecorAI(DistributedNodeAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedLawnDecorAI")
2015-05-10 07:10:32 -05:00
def __init__(self, air):
2015-05-24 18:23:54 -05:00
DistributedNodeAI.__init__(self, air)
2015-05-10 07:10:32 -05:00
self.air = air
self.plot = None
2015-05-24 18:23:54 -05:00
self.ownerIndex = None
def announceGenerate(self):
DistributedNodeAI.announceGenerate(self)
def delete(self):
DistributedNodeAI.delete(self)
def disable(self):
DistributedNodeAI.disable(self)
def setEstate(self, estate):
self.estate = estate
def getEstate(self):
return self.estate
2015-05-10 07:10:32 -05:00
2015-05-10 06:47:03 -05:00
def setPlot(self, plot):
2015-05-10 07:00:38 -05:00
self.plot = plot
2015-03-03 16:10:12 -06: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-10 06:47:03 -05:00
def setOwnerIndex(self, index):
2015-05-10 07:00:38 -05:00
self.ownerIndex = index
2015-03-03 16:10:12 -06:00
2015-05-24 18:23:54 -05:00
def getOwnerIndex(self):
return self.ownerIndex
def setPosition(self, x, y, z):
self.position = (x, y, z)
def getPosition(self):
return self.position
def setHeading(self, heading):
self.heading = heading
def getHeading(self):
return self.heading
2015-03-03 16:10:12 -06:00
def plotEntered(self):
pass
2015-05-24 18:23:54 -05:00
def removeItem(self, avId):
self.inUseBy = avId
self.d_setMovie(GardenGlobals.MOVIE_REMOVE, avId)
2015-03-03 16:10:12 -06:00
2015-05-24 18:23:54 -05:00
def d_setMovie(self, mode, avId):
self.sendUpdate('setMovie', [mode, avId])
2015-03-03 16:10:12 -06:00
def movieDone(self):
2015-05-24 18:23:54 -05:00
if hasattr(self, 'inUseBy'):
del self.inUseBy
2015-03-03 16:10:12 -06:00
def interactionDenied(self, todo0):
pass