From d6c0975c056a30dc94097b170c7732526d1181e8 Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Wed, 19 Jan 2022 14:58:38 -0500 Subject: [PATCH] fix fish bingo crashes Hope you had fun playing Fish Bingo. --- toontown/fishing/BingoCardBase.py | 4 ++-- toontown/fishing/BingoCardGui.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toontown/fishing/BingoCardBase.py b/toontown/fishing/BingoCardBase.py index 9b58dbb..411937f 100644 --- a/toontown/fishing/BingoCardBase.py +++ b/toontown/fishing/BingoCardBase.py @@ -13,7 +13,7 @@ class BingoCardBase: self.cardSize = cardSize self.cellList = [] self.gameType = None - self.gameState = 1 << self.cardSize / 2 + self.gameState = 1 << self.cardSize // 2 return def destroy(self): @@ -35,7 +35,7 @@ class BingoCardBase: rodId = 0 for index in range(self.cardSize): - if index != self.cardSize / 2: + if index != self.cardSize // 2: choice = rng.randrange(0, len(fishList)) self.cellList.append(fishList.pop(choice)) else: diff --git a/toontown/fishing/BingoCardGui.py b/toontown/fishing/BingoCardGui.py index 7680632..9ff804b 100644 --- a/toontown/fishing/BingoCardGui.py +++ b/toontown/fishing/BingoCardGui.py @@ -32,7 +32,7 @@ class BingoCardGui(DirectFrame): self.initialiseoptions(BingoCardGui) self.game = None self.cellGuiList = [] - self.parent = parent + self._parent = parent self.load() self.hide() self.taskNameFlashFish = 'flashMatchingFishTask' @@ -126,7 +126,7 @@ class BingoCardGui(DirectFrame): self.gameType.hide() self.jpText = DirectLabel(parent=self, pos=(BG.GridXOffset, 0, 0.22), relief=None, state=DGG.NORMAL, text='', text_scale=TTLocalizer.BCGjpText, text_pos=(0, 0, 0), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_font=ToontownGlobals.getInterfaceFont(), text_wordwrap=TTLocalizer.BCGjpTextWordwrap) self.gameOver = DirectLabel(parent=self, pos=(BG.GridXOffset, 0, 0), relief=None, state=DGG.NORMAL, text='', text_scale=textScale, text_fg=(1, 1, 1, 1), text_font=ToontownGlobals.getSignFont()) - self.jpSign = DirectFrame(parent=self.parent, relief=None, state=DGG.NORMAL, pos=BG.CardPosition, scale=(0.035, 0.035, 0.035), text=TTLocalizer.FishBingoJackpot, text_scale=2, text_pos=(-1.5, 18.6), text_fg=(1, 1, 1, 1), image=self.model.find('**/jackpot'), image_pos=(0, 0, 0), image_hpr=(0, 90, 0), sortOrder=DGG.BACKGROUND_SORT_INDEX) + self.jpSign = DirectFrame(parent=self._parent, relief=None, state=DGG.NORMAL, pos=BG.CardPosition, scale=(0.035, 0.035, 0.035), text=TTLocalizer.FishBingoJackpot, text_scale=2, text_pos=(-1.5, 18.6), text_fg=(1, 1, 1, 1), image=self.model.find('**/jackpot'), image_pos=(0, 0, 0), image_hpr=(0, 90, 0), sortOrder=DGG.BACKGROUND_SORT_INDEX) self.makeJackpotLights(self.jpSign) self.hideJackpot() self.makeTutorial()