diff --git a/toontown/estate/DistributedEstateAI.py b/toontown/estate/DistributedEstateAI.py index 57043889..37e98592 100644 --- a/toontown/estate/DistributedEstateAI.py +++ b/toontown/estate/DistributedEstateAI.py @@ -101,7 +101,7 @@ class Garden: box.setPos(x, y, 0) box.setH(h) box.setOwnerIndex(houseIndex) - box.generateWithRequired(estateMgr.zoneId) + box.generate()#WithRequired(estateMgr.zoneId) self.objects.append(box) plots = GardenGlobals.estatePlots[houseIndex] @@ -118,7 +118,7 @@ class Garden: tree.setWaterLevel(waterLevel) tree.setGrowthLevel(growthLevel) tree.calculate(nextGrowth, nextLevelDecrease) - tree.generateWithRequired(estateMgr.zoneId) + tree.generate()#WithRequired(estateMgr.zoneId) self.trees.append(tree) class GardenManager: diff --git a/toontown/estate/DistributedGagTreeAI.py b/toontown/estate/DistributedGagTreeAI.py index 1873bcaf..c6679489 100644 --- a/toontown/estate/DistributedGagTreeAI.py +++ b/toontown/estate/DistributedGagTreeAI.py @@ -1,12 +1,33 @@ from direct.directnotify import DirectNotifyGlobal from toontown.estate.DistributedPlantBaseAI import DistributedPlantBaseAI +import GardenGlobals class DistributedGagTreeAI(DistributedPlantBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGagTreeAI") - def setWilted(self, todo0): - pass + 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)) def requestHarvest(self): pass -