From 8abec6d9a9715e455667da92823f5c42348c7084 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Tue, 26 Nov 2024 21:10:50 -0700 Subject: [PATCH] oops --- src/gamemodes/pactbreaker.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gamemodes/pactbreaker.py b/src/gamemodes/pactbreaker.py index e42ab52e..f73c7d27 100644 --- a/src/gamemodes/pactbreaker.py +++ b/src/gamemodes/pactbreaker.py @@ -172,6 +172,10 @@ def on_del_player(self, evt: Event, var: GameState, player, all_roles, death_tri del self.collected_evidence[player] for _, others in self.collected_evidence.items(): others.discard(player) + if player in self.stale_evidence.items(): + del self.stale_evidence[player] + for _, others in self.stale_evidence.items(): + others.discard(player) for _, others in self.visit_count.items(): del others[:player:] if self.last_voted is player: @@ -428,12 +432,13 @@ def on_night_kills(self, evt: Event, var: GameState): visitor.send(messages[f"pactbreaker_{loc}_evidence"].format(evidence_target, real_role)) if empty: - visitor.send(messages[f"pactbreaker_{loc}_empty"]) + visitor.send(messages[f"pactbreaker_{loc}_empty"].format(owner)) # handle share cards if len(shares) == 1: for visitor in shares: loc = self.location_key(self.visiting[visitor]) + # safe to omit param here as loc will never be a house visitor.send(messages[f"pactbreaker_{loc}_empty"]) else: random.shuffle(shares) @@ -444,6 +449,7 @@ def on_night_kills(self, evt: Event, var: GameState): self.clue_tokens[visitor] += 1 visitor.send(messages[f"pactbreaker_{loc}_share"]) else: + # safe to omit param here as loc will never be a house visitor.send(messages[f"pactbreaker_{loc}_empty"]) def on_player_protected(self,