From 4363eab91ca1afc3174c3d26b06e41897c6bf23e Mon Sep 17 00:00:00 2001 From: John Cote Date: Tue, 29 Jun 2021 00:46:14 -0400 Subject: [PATCH] suit: Fix too many Cogs on streets --- toontown/suit/DistributedSuitPlannerAI.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toontown/suit/DistributedSuitPlannerAI.py b/toontown/suit/DistributedSuitPlannerAI.py index 3a380d9..4e1357b 100644 --- a/toontown/suit/DistributedSuitPlannerAI.py +++ b/toontown/suit/DistributedSuitPlannerAI.py @@ -104,7 +104,7 @@ class DistributedSuitPlannerAI(DistributedObjectAI.DistributedObjectAI, SuitPlan self.hoodInfoIdx = index self.currDesired = None - self.baseNumSuits = (self.SuitHoodInfo[self.hoodInfoIdx][self.SUIT_HOOD_INFO_MIN] + self.SuitHoodInfo[self.hoodInfoIdx][self.SUIT_HOOD_INFO_MAX]) / 2 + self.baseNumSuits = (self.SuitHoodInfo[self.hoodInfoIdx][self.SUIT_HOOD_INFO_MIN] + self.SuitHoodInfo[self.hoodInfoIdx][self.SUIT_HOOD_INFO_MAX]) // 2 self.targetNumCogdos = 0 if simbase.air.wantCogdominiums: self.targetNumCogdos = int(0.5 + self.SuitHoodInfo[self.hoodInfoIdx][self.SUIT_HOOD_INFO_BMIN] * self.CogdoRatio) @@ -586,7 +586,7 @@ class DistributedSuitPlannerAI(DistributedObjectAI.DistributedObjectAI, SuitPlan targetFlyInNum = self.calcDesiredNumFlyInSuits() targetFlyInNum = min(targetFlyInNum, self.TOTAL_MAX_SUITS - self.numBuildingSuits) streetPoints = self.streetPointList[:] - flyInDeficit = (targetFlyInNum - self.numFlyInSuits + 3) / 4 + flyInDeficit = (targetFlyInNum - self.numFlyInSuits + 3) // 4 while flyInDeficit > 0: if not self.createNewSuit([], streetPoints): break @@ -602,7 +602,7 @@ class DistributedSuitPlannerAI(DistributedObjectAI.DistributedObjectAI, SuitPlan targetBuildingNum = int(len(suitBuildings) * self.SUIT_BUILDING_NUM_SUITS) targetBuildingNum += flyInDeficit targetBuildingNum = min(targetBuildingNum, self.TOTAL_MAX_SUITS - self.numFlyInSuits) - buildingDeficit = (targetBuildingNum - self.numBuildingSuits + 3) / 4 + buildingDeficit = (targetBuildingNum - self.numBuildingSuits + 3) // 4 while buildingDeficit > 0: if not self.createNewSuit(suitBuildings, streetPoints): break