Poodletooth-iLand/toontown/estate/DistributedGagTreeAI.py

34 lines
1 KiB
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from direct.directnotify import DirectNotifyGlobal
from toontown.estate.DistributedPlantBaseAI import DistributedPlantBaseAI
2015-03-13 18:52:45 -05:00
import GardenGlobals
2015-03-03 16:10:12 -06:00
class DistributedGagTreeAI(DistributedPlantBaseAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGagTreeAI")
2015-03-13 18:52:45 -05:00
def __init__(self, air):
DistributedPlantBaseAI.__init__(self, air)
self.setTypeIndex(GardenGlobals.GAG_TREE_TYPE)
self.wilted = 0
def setWilted(self, wilted):
self.wilted = wilted
def d_setWilted(self, wilted):
self.sendUpdate("setWilted", [wilted])
def b_setWilted(self, wilted):
self.setWilted(wilted)
self.d_setWilted(wilted)
def getWilted(self):
return self.wilted
def calculate(self, nextGrowth, nextLevelDecrease):
now = time.time()
while nextLevelDecrease < now:
nextLevelDecrease += 3893475798397 # to do
self.b_setWaterLevel(max(-1, self.waterLevel - 1))
2015-03-03 16:10:12 -06:00
def requestHarvest(self):
pass