diff --git a/toontown/estate/DistributedFlowerAI.py b/toontown/estate/DistributedFlowerAI.py index efc59041..9f79ace6 100755 --- a/toontown/estate/DistributedFlowerAI.py +++ b/toontown/estate/DistributedFlowerAI.py @@ -115,13 +115,13 @@ def satanGrowFlowers(): now = int(time.time()) i = 0 - for flower in garden.flowers: + for flower in garden.flowers.union(garden.trees): flower.b_setWaterLevel(5) flower.b_setGrowthLevel(2) flower.update() i += 1 - return '%d disgusting flowers grown' % i + return '%d disgusting flowers and trees grown' % i @magicWord(category=CATEGORY_PROGRAMMER) def satanPickAll(): diff --git a/toontown/safezone/SafeZoneManagerAI.py b/toontown/safezone/SafeZoneManagerAI.py index d905c0c0..52854b1c 100755 --- a/toontown/safezone/SafeZoneManagerAI.py +++ b/toontown/safezone/SafeZoneManagerAI.py @@ -1,9 +1,6 @@ from direct.directnotify.DirectNotifyGlobal import * from direct.distributed import DistributedObjectAI - - -HealFrequency = 10.0 # The time in seconds between each Toon-up pulse. - +from toontown.toonbase import ToontownGlobals class SafeZoneManagerAI(DistributedObjectAI.DistributedObjectAI): notify = directNotify.newCategory('SafeZoneManagerAI') @@ -13,7 +10,7 @@ class SafeZoneManagerAI(DistributedObjectAI.DistributedObjectAI): av = self.air.doId2do.get(avId) if not av: return - av.startToonUp(HealFrequency) + av.startToonUp(ToontownGlobals.TOONUP_FREQUENCY) def exitSafeZone(self): avId = self.air.getAvatarIdFromSender() diff --git a/toontown/safezone/TreasureGlobals.py b/toontown/safezone/TreasureGlobals.py index d9f6d1aa..0d77e106 100755 --- a/toontown/safezone/TreasureGlobals.py +++ b/toontown/safezone/TreasureGlobals.py @@ -76,7 +76,7 @@ SafeZoneTreasureSpawns = { 5 # Maximum ), ToontownGlobals.DonaldsDock: ( - TreasureDD, 10, # DDTreasure heals 10 each... + TreasureDD, 6, # DDTreasure heals 6 each... [ (52.9072, -23.4768, -12.308), (35.3827, -51.9196, -12.308), @@ -109,7 +109,7 @@ SafeZoneTreasureSpawns = { 2 # Maximum ), ToontownGlobals.DaisyGardens: ( - TreasureDG, 10, # DGTreasure heals 10 each... + TreasureDG, 9, # DGTreasure heals 9 each... [ (-49, 156, 0.0), (-59, 50, 0.0), @@ -136,7 +136,7 @@ SafeZoneTreasureSpawns = { 2 # Maximum ), ToontownGlobals.TheBrrrgh: ( - TreasureBR, 12, # +12 laff + TreasureBR, 15, # +15 laff [ (-108, 46, 6.2), (-111, 74, 6.2), @@ -161,7 +161,7 @@ SafeZoneTreasureSpawns = { 2 # Maximum ), ToontownGlobals.MinniesMelodyland: ( - TreasureMM, 10, # +10 laff + TreasureMM, 12, # +12 laff [ (118, -39, 3.3), (118, 1, 3.3), @@ -187,7 +187,7 @@ SafeZoneTreasureSpawns = { 2 # Maximum ), ToontownGlobals.DonaldsDreamland: ( - TreasureDL, 12, # +12 laff + TreasureDL, 18, # +18 laff [ (86, 69, -17.4), (34, -48, -16.4), diff --git a/toontown/toon/DistributedToonAI.py b/toontown/toon/DistributedToonAI.py index fd5a0f2b..66d76497 100755 --- a/toontown/toon/DistributedToonAI.py +++ b/toontown/toon/DistributedToonAI.py @@ -2442,14 +2442,20 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo def startToonUp(self, healFrequency): self.stopToonUp() - self.healFrequency = healFrequency + self.nextToonup = (healFrequency, self.indexOf(ToontownGlobals.TOONUP_PULSE_ZONES, ZoneUtil.getCanonicalHoodId(self.zoneId), 0) + 1) self.__waitForNextToonUp() + + def indexOf(self, list, element, default): + try: + return list.index(element) + except: + return default def __waitForNextToonUp(self): - taskMgr.doMethodLater(self.healFrequency, self.toonUpTask, self.uniqueName('safeZoneToonUp')) + taskMgr.doMethodLater(self.nextToonup[0], self.toonUpTask, self.uniqueName('safeZoneToonUp')) def toonUpTask(self, task): - self.toonUp(1) + self.toonUp(self.nextToonup[1]) self.__waitForNextToonUp() return Task.done diff --git a/toontown/toonbase/ToontownGlobals.py b/toontown/toonbase/ToontownGlobals.py index 0f859318..44737022 100755 --- a/toontown/toonbase/ToontownGlobals.py +++ b/toontown/toonbase/ToontownGlobals.py @@ -1686,4 +1686,6 @@ TF_ALREADY_FRIENDS = 6 TF_ALREADY_FRIENDS_NAME = 7 TF_SUCCESS = 8 -GROUP_ZONES = [11000, 11100, 11200, 12000, 12100, 13000, 13100, 13200, 10000, 10100] \ No newline at end of file +GROUP_ZONES = [11000, 11100, 11200, 12000, 12100, 13000, 13100, 13200, 10000, 10100] +TOONUP_PULSE_ZONES = [ToontownCentral, DonaldsDock, DaisyGardens, MinniesMelodyland, TheBrrrgh, DonaldsDreamland] +TOONUP_FREQUENCY = 30 \ No newline at end of file