diff --git a/toontown/building/PetshopBuildingAI.py b/toontown/building/PetshopBuildingAI.py index d0216bf3..b77f9f69 100644 --- a/toontown/building/PetshopBuildingAI.py +++ b/toontown/building/PetshopBuildingAI.py @@ -35,8 +35,6 @@ class PetshopBuildingAI: self.interior.generateWithRequired(self.interiorZone) self.npcs = NPCToons.createNpcsInZone(self.air, self.interiorZone) - - seeds = self.air.petMgr.getAvailablePets(1, len(self.npcs)) door = DistributedDoorAI.DistributedDoorAI( self.air, blockNumber, DoorTypes.EXT_STANDARD) diff --git a/toontown/pets/PetManagerAI.py b/toontown/pets/PetManagerAI.py index 87100575..410470f5 100644 --- a/toontown/pets/PetManagerAI.py +++ b/toontown/pets/PetManagerAI.py @@ -7,7 +7,7 @@ def getDayId(): return int(time.time() / DAY) class PetManagerAI: - NUM_DAILY_PETS = 5 + NUM_DAILY_PETS = 10 def __init__(self, air): self.air = air @@ -28,11 +28,11 @@ class PetManagerAI: self.seeds['day'] = getDayId() simbase.backups.save('pet-seeds', (self.air.districtId,), self.seeds) - def getAvailablePets(self, seed, safezoneId): + def getAvailablePets(self, safezoneId): if self.seeds.get('day', -1) != getDayId(): self.generateSeeds() - return list(set(self.seeds.get(safezoneId, [seed]))) + return self.seeds[safezoneId] if safezoneId in self.seeds else self.seeds[str(safezoneId)] def createNewPetFromSeed(self, avId, seed, nameIndex, gender, safeZoneId): av = self.air.doId2do[avId] diff --git a/toontown/toon/DistributedNPCPetclerkAI.py b/toontown/toon/DistributedNPCPetclerkAI.py index 2daee72d..beb7b5c2 100644 --- a/toontown/toon/DistributedNPCPetclerkAI.py +++ b/toontown/toon/DistributedNPCPetclerkAI.py @@ -27,7 +27,7 @@ class DistributedNPCPetclerkAI(DistributedNPCToonBaseAI): if self.isBusy(): self.freeAvatar(avId) return - self.petSeeds = self.air.petMgr.getAvailablePets(3, ZoneUtil.getCanonicalHoodId(self.zoneId)) + self.petSeeds = self.air.petMgr.getAvailablePets(ZoneUtil.getCanonicalHoodId(self.zoneId)) numGenders = len(PetDNA.PetGenders) self.petSeeds *= numGenders self.petSeeds.sort()