From 5101a94e5a5464cb1535808a014f1d20e8f6f1ee Mon Sep 17 00:00:00 2001 From: Loudrob Date: Thu, 11 Jun 2015 13:48:13 -0400 Subject: [PATCH] GARDENS: Needs to get done. --- toontown/estate/DistributedEstateAI.py | 4 +++- toontown/estate/DistributedFlowerAI.py | 3 +++ toontown/estate/DistributedGagTreeAI.py | 1 + toontown/estate/DistributedGardenPlotAI.py | 3 ++- toontown/estate/DistributedPlantBaseAI.py | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/toontown/estate/DistributedEstateAI.py b/toontown/estate/DistributedEstateAI.py index edcacf5e..f53b1c2f 100755 --- a/toontown/estate/DistributedEstateAI.py +++ b/toontown/estate/DistributedEstateAI.py @@ -613,8 +613,9 @@ class DistributedEstateAI(DistributedObjectAI): def gameTableOver(self): pass - + def placeStarterGarden(self, avatar): + # TODO: Place garden if a toon already owns one. avId = avatar.doId slot = self.toons.index(avId) plotPos = GardenGlobals.estatePlots[slot] @@ -643,6 +644,7 @@ class DistributedEstateAI(DistributedObjectAI): newPlot.generateWithRequired(self.zoneId) self.plots[slot].append(newPlot) elif i == GardenGlobals.FLOWER_TYPE: + # TODO: Place flower plots more accurately. x, y, h = n[:3] newPlot = DistributedGardenPlotAI(self.air) newPlot.setEstate(self.doId) diff --git a/toontown/estate/DistributedFlowerAI.py b/toontown/estate/DistributedFlowerAI.py index b2dffacd..e7d5621d 100755 --- a/toontown/estate/DistributedFlowerAI.py +++ b/toontown/estate/DistributedFlowerAI.py @@ -1,6 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from toontown.estate.DistributedPlantBaseAI import DistributedPlantBaseAI +# TODO: Add flower to basket when picking, give shovel skill only if the +# flower is player's tier. + class DistributedFlowerAI(DistributedPlantBaseAI): notify = DirectNotifyGlobal.directNotify.newCategory("DistributedFlowerAI") diff --git a/toontown/estate/DistributedGagTreeAI.py b/toontown/estate/DistributedGagTreeAI.py index 8e099afc..67d80265 100755 --- a/toontown/estate/DistributedGagTreeAI.py +++ b/toontown/estate/DistributedGagTreeAI.py @@ -26,6 +26,7 @@ class DistributedGagTreeAI(DistributedPlantBaseAI): return self.wilted def requestHarvest(self, doId): + # TODO: Actually harvest the gags and add them to toon inventory. av = simbase.air.doId2do.get(doId) harvested = 0 track, level = GardenGlobals.getTreeTrackAndLevel(self.typeIndex) diff --git a/toontown/estate/DistributedGardenPlotAI.py b/toontown/estate/DistributedGardenPlotAI.py index 818270ea..b06d8d1a 100755 --- a/toontown/estate/DistributedGardenPlotAI.py +++ b/toontown/estate/DistributedGardenPlotAI.py @@ -49,7 +49,7 @@ class DistributedGardenPlotAI(DistributedLawnDecorAI): def addData(self): estate = simbase.air.doId2do.get(self.getEstate()) - plantedAt = int(datetime.datetime.now().strftime('%Y%m%d%H%M')) + plantedAt = int(datetime.datetime.now().strftime('%Y%m%d%H%M')) # TODO: Possibly store this in mongodb/cPickle instead. if isinstance(self.planted, DistributedFlowerAI): data = [ self.getPlot(), @@ -181,6 +181,7 @@ class DistributedGardenPlotAI(DistributedLawnDecorAI): self.sendUpdate('setMovie', [GardenGlobals.MOVIE_PLANT, toon]) def plantNothing(self, burntBeans, toon): + # TODO: Fix exploit. av = simbase.air.doId2do.get(toon) av.takeMoney(burntBeans) self.planted = None diff --git a/toontown/estate/DistributedPlantBaseAI.py b/toontown/estate/DistributedPlantBaseAI.py index fe0ffa87..e59706cf 100755 --- a/toontown/estate/DistributedPlantBaseAI.py +++ b/toontown/estate/DistributedPlantBaseAI.py @@ -51,6 +51,8 @@ class DistributedPlantBaseAI(DistributedLawnDecorAI): return self.growthLevel def waterPlant(self, avId): + # TODO: Proper water threshold for watering can type. + # Not supposed to be 16 for all watering cans. self.lastWateredBy = avId newLevel = self.waterLevel + 1 if newLevel > self.maxWaterLevel: @@ -69,6 +71,7 @@ class DistributedPlantBaseAI(DistributedLawnDecorAI): del self.lastWateredBy estate = simbase.air.doId2do.get(self.getEstate()) dataIndex = -1 + # TODO: Possibly store this in mongodb/cPickle instead. for n, item in enumerate(estate.items[self.getOwnerIndex()]): if item[0] == self.getPlot(): dataIndex = n