From 59753e5ea5f8d7247add63b6d6b4db0700208241 Mon Sep 17 00:00:00 2001 From: Anthony Samms Date: Fri, 21 Nov 2025 01:16:50 -0500 Subject: [PATCH] Fix crash on scarlet police branch --- scenes/game.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scenes/game.py b/scenes/game.py index f82f069..c65ce47 100644 --- a/scenes/game.py +++ b/scenes/game.py @@ -910,20 +910,26 @@ class Player: self.branch_indicator.level_down('expert') else: self.branch_indicator.level_up('expert') - self.branch_m.pop(0) - self.branch_n.pop(0) + if self.branch_m: + self.branch_m.pop(0) + if self.branch_n: + self.branch_n.pop(0) elif self.branch_condition_count >= m_req: self.merge_branch_section(self.branch_m.pop(0), current_ms) if self.branch_indicator is not None and self.branch_indicator.difficulty != 'master': self.branch_indicator.level_up('master') - self.branch_n.pop(0) - self.branch_e.pop(0) + if self.branch_n: + self.branch_n.pop(0) + if self.branch_e: + self.branch_e.pop(0) else: self.merge_branch_section(self.branch_n.pop(0), current_ms) if self.branch_indicator is not None and self.branch_indicator.difficulty != 'normal': self.branch_indicator.level_down('normal') - self.branch_m.pop(0) - self.branch_e.pop(0) + if self.branch_m: + self.branch_m.pop(0) + if self.branch_e: + self.branch_e.pop(0) if self.branch_indicator is not None: logger.info(f"Branch set to {self.branch_indicator.difficulty} based on conditions {self.branch_condition_count}, {e_req, m_req}") self.branch_condition_count = 0