From 8d6d23261e3e7da69205cfb89b234770681c2ff2 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 20 Oct 2026 21:46:37 +0100 Subject: [PATCH] Forecast line gets its own tooltip Co-Authored-By: Claude Opus 5.5 --- game.py | 2 +- static/app.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/game.py b/game.py index aa73bdf..62ac598 100644 --- a/game.py +++ b/game.py @@ -3849,7 +3849,7 @@ def happenings_view(world: dict, now: float) -> dict: "season": season(world, now), "weather": {**{k: v for k, v in WEATHER[weather["kind"]].items()}, "kind": weather["kind"], "until": weather["until"], "next": weather["next"], "next_name": WEATHER[weather["next"]]["name"], - "next_icon": WEATHER[weather["next"]]["icon"]}, + "next_icon": WEATHER[weather["next"]]["icon"], "next_text": WEATHER[weather["next"]]["text"]}, "effects": [{k: e[k] for k in ("kind", "name", "icon", "text", "until", "speed", "yield", "xp") if k in e} | {"offer": e.get("offer", False), "cost": e.get("cost")} for e in city["effects"]], "problems": problems, diff --git a/static/app.js b/static/app.js index 62ae17f..9a91875 100644 --- a/static/app.js +++ b/static/app.js @@ -1016,7 +1016,12 @@ function weatherCard() { const h = S.happenings, w = h.weather; return `
${h.season.icon} ${h.season.name}, day ${h.season.day}
${w.icon} ${esc(w.name)}
-
${w.next_icon} ${esc(w.next_name)} in ${countdown(w.until)}
`; +
${w.next_icon} ${esc(w.next_name)} in ${countdown(w.until)}
`; +} + +// "Fog in 3h 20m: scouting 30% and hunting 10% slower." +function forecastTip(w) { + return `${w.next_name} in ${dur(w.until - serverNow())}: ${w.next_text.charAt(0).toLowerCase()}${w.next_text.slice(1)}.`; } // Everything going on in the city right now, and what anyone can do about it.