From 067fb04dbdbc912d9c80f1b8c567e94ba8362266 Mon Sep 17 00:00:00 2001 From: DenialMC Date: Wed, 13 May 2015 20:12:04 +0300 Subject: [PATCH] Fix new seed generation every day --- toontown/pets/PetManagerAI.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/toontown/pets/PetManagerAI.py b/toontown/pets/PetManagerAI.py index 3bbb0ccd..87100575 100644 --- a/toontown/pets/PetManagerAI.py +++ b/toontown/pets/PetManagerAI.py @@ -1,12 +1,10 @@ from toontown.toonbase import ToontownGlobals, TTLocalizer import PetUtil, PetDNA, time, random -MINUTE = 60 -HOUR = 60 * MINUTE -DAY = 24 * HOUR +DAY = 24 * 60 * 60 def getDayId(): - return int(time.time() // DAY) + return int(time.time() / DAY) class PetManagerAI: NUM_DAILY_PETS = 5 @@ -15,7 +13,7 @@ class PetManagerAI: self.air = air self.seeds = simbase.backups.load('pet-seeds', (self.air.districtId,), default={}) - if self.seeds.get('day', -1) != getDayId() or len(self.seeds.get(ToontownGlobals.ToontownCentral, [])) != self.NUM_DAILY_PETS: + if self.seeds.get('day', -1) != getDayId(): self.generateSeeds() def generateSeeds(self):