commit
591f353783
|
@ -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 leagues import league_structure
|
||||||
from league_storage import league_exists
|
from league_storage import league_exists
|
||||||
from flask import Flask, url_for, Response, render_template, request, jsonify, send_from_directory, abort
|
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():
|
if "weather_message" in this_game.last_update[0].keys():
|
||||||
state["update_emoji"] = this_game.weather.emoji
|
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"] = "🏏"
|
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():
|
if "steals" in this_game.last_update[0].keys():
|
||||||
updatestring = ""
|
updatestring = ""
|
||||||
|
|
|
@ -89,7 +89,8 @@ class Starlight(Weather):
|
||||||
result.clear()
|
result.clear()
|
||||||
result.update({
|
result.update({
|
||||||
"text": f"{game.get_batter()} hits a dinger, but the stars do not approve! The ball pulls foul.",
|
"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:
|
else:
|
||||||
result["in_the_park"] = True
|
result["in_the_park"] = True
|
||||||
|
@ -313,7 +314,7 @@ class MeteorShower(Weather):
|
||||||
bat_team.score += 1
|
bat_team.score += 1
|
||||||
result.clear()
|
result.clear()
|
||||||
result.update({
|
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,
|
"text_only": True,
|
||||||
"weather_message": True
|
"weather_message": True
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue