diff --git a/main_controller.py b/main_controller.py index c88631f..eb7719c 100644 --- a/main_controller.py +++ b/main_controller.py @@ -1,4 +1,4 @@ -import asyncio, time, datetime, games, json, threading, jinja2, leagues, os, leagues +import asyncio, time, datetime, games, json, threading, jinja2, leagues, os, leagues, gametext from leagues import league_structure from league_storage import league_exists from flask import Flask, url_for, Response, render_template, request, jsonify, send_from_directory, abort @@ -186,8 +186,12 @@ def update_loop(): if "weather_message" in this_game.last_update[0].keys(): state["update_emoji"] = this_game.weather.emoji - else: + elif "ishit" in this_game.last_update[0] and this_game.last_update[0]["ishit"]: state["update_emoji"] = "🏏" + elif this_game.last_update[0]["text"] == gametext.appearance_outcomes.walk: + state["update_emoji"] = "👟" + else: + state["update_emoji"] = "🗞" if "steals" in this_game.last_update[0].keys(): updatestring = "" diff --git a/weather.py b/weather.py index 7e076a0..8f0e8b2 100644 --- a/weather.py +++ b/weather.py @@ -89,7 +89,8 @@ class Starlight(Weather): result.clear() result.update({ "text": f"{game.get_batter()} hits a dinger, but the stars do not approve! The ball pulls foul.", - "text_only": True + "text_only": True, + "weather_message": True }) else: result["in_the_park"] = True @@ -313,7 +314,7 @@ class MeteorShower(Weather): bat_team.score += 1 result.clear() result.update({ - "text": f"{runner.name} wished upon one of the shooting stars, and was warped to None base!! 1 runs score!", + "text": f"{runner.name} wished upon one of the shooting stars, and was warped to None base!! 1 runs scored!", "text_only": True, "weather_message": True })