Merge pull request #214 from Sakimori/indev

Indev
This commit is contained in:
Sakimori 2021-03-02 01:58:39 -05:00 committed by GitHub
commit 591f353783
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -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 = ""

View file

@ -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
})