Compare commits

..

6 Commits

Author SHA1 Message Date
ElementalAlchemist 75a6733362 Better align bus stop signs with the front of the bus 10 months ago
ElementalAlchemist a80f7889af Show icons for points we've driven past 10 months ago
ElementalAlchemist e440dd965c Constantize the canvas width in case we want it widened in the future 10 months ago
ElementalAlchemist 79e6e7266c Add key-out color on the ground 10 months ago
ElementalAlchemist 2d68b7805e Implement scaling 10 months ago
ElementalAlchemist 7fca10593d Implement canvas-based bus system 10 months ago

@ -573,9 +573,6 @@ def get_chat_messages(channel):
if end <= start:
return "End must be after start", 400
if end - start > datetime.timedelta(hours=2):
return "Cannot request more than 2h of chat", 400
hours_path = os.path.join(app.static_folder, channel, "chat")
# This process below may fail if a batch is deleted out from underneath us.

@ -109,10 +109,6 @@ async function drawRoad() {
// Clear the previous canvas before starting
context.clearRect(0, 0, CANVAS_PIXEL_WIDTH, 100);
// Background the whole thing as the key-out color in case we need to bail
// out before drawing (e.g. we're in a non-DB game menu)
context.fillStyle = KEY_OUT_COLOR;
context.fillRect(0, 0, CANVAS_PIXEL_WIDTH, 100);
const currentTime = busData.clock_minutes;
const distance = busData.odometer;

@ -835,6 +835,7 @@ def get_odometer(channel):
SELECT timestamp, clock, timeofday
FROM bus_data
WHERE clock IS NOT NULL
AND timeofday IS NOT NULL
AND channel = %(channel)s
AND timestamp > %(start)s
AND timestamp <= %(end)s
@ -848,8 +849,7 @@ def get_odometer(channel):
clock_face = None
else:
clock12h = result.clock
# HACK: assume null means dawn, as we can reliably detect everything else.
timeofday = result.timeofday or "dawn"
timeofday = result.timeofday
clock24h = clock12h
if time_is_pm(conn, result.timestamp, clock12h, timeofday):

@ -153,11 +153,11 @@ def main(conf_file, message_log_file, name=socket.gethostname()):
log["giveaway_entries"] = entries
entries_str = " ({} entries of ${:.2f})".format(entries, giveaway_amount)
logging.info("New donation total: {}{}{}".format(msg["d"], increase_str, entries_str))
total = msg["d"]
if increase is not None and increase > 0:
client.send_to_stream("bot-spam", "Donation Firehose", "Donation total is now ${:.2f}{}{}".format(msg["d"], increase_str, entries_str))
if increase is not None and increase >= 500:
client.send_to_stream("bot-spam", "Notable Donations", "Large donation of ${:.2f} (total ${:.2f}){}".format(increase, msg['d'], entries_str))
total = msg["d"]
elif msg["c"].startswith("bid:"):
log["type"] = "prize"

Loading…
Cancel
Save