From 57ef55e15cdc4b3a65400ccc9eb7c6a1b43cd436 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 28 Feb 2021 13:37:43 -0500 Subject: [PATCH 1/3] fixed weather emoji for starlight procs --- weather.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weather.py b/weather.py index 7e076a0..d611b66 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 From 5345450020517dc60783fb3c159a64caaf36a791 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 28 Feb 2021 14:15:45 -0500 Subject: [PATCH 2/3] changed emoji for basic messages based on context --- main_controller.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 = "" From f83a385b5332204455329ac17c4d998f5c777968 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 28 Feb 2021 14:16:36 -0500 Subject: [PATCH 3/3] fixed an inconsistency with meteor shower text --- weather.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weather.py b/weather.py index d611b66..8f0e8b2 100644 --- a/weather.py +++ b/weather.py @@ -314,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 })