From a136a940bd7184701073a191e55d61625ac403c3 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 27 Jun 2021 16:55:24 -0400 Subject: [PATCH] probable fix for #240 and #241 --- games.py | 2 +- gametext.py | 1 + main_controller.py | 2 +- the_prestige.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/games.py b/games.py index 73fb8dd..76f303d 100644 --- a/games.py +++ b/games.py @@ -550,7 +550,7 @@ class game(object): else: result = {} - self.voice.activate(self.last_update[0], result, self) + result = self.voice.activate(self.last_update[0], result, self) if "twopart" not in result: self.weather.activate(self, result) # possibly modify result in-place diff --git a/gametext.py b/gametext.py index 17940c3..45f6595 100644 --- a/gametext.py +++ b/gametext.py @@ -66,6 +66,7 @@ class game_strings_base(object): }) else: currentupdate["displaytext"] = f"{currentupdate['batter']} {self.format_gamestring(getattr(self, currentupdate['outcome'].name)[currentupdate['voiceindex']], currentupdate)}" + return currentupdate except: game_strings_base().activate(lastupdate, currentupdate, game) diff --git a/main_controller.py b/main_controller.py index 6b92b5c..95d4f82 100644 --- a/main_controller.py +++ b/main_controller.py @@ -256,4 +256,4 @@ def update_loop(): socket_thread = threading.Thread(target=socketio.emit, args=("states_update", game_states)) socket_thread.start() #socketio.emit("states_update", game_states) - time.sleep(3) \ No newline at end of file + time.sleep(8) \ No newline at end of file diff --git a/the_prestige.py b/the_prestige.py index 3381fdc..9728df8 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -147,7 +147,7 @@ class StartGameCommand(Command): weather_name = flag[1] if weather_name not in weather.all_weathers(): raise CommandError("We can't find that weather, chief. Try again.") - elif flag[0] == "v": + elif flag[0] == "v" or flag[0] == "a": if flag[1] in gametext.all_voices(): voice = gametext.all_voices()[flag[1]] else: