diff --git a/game.py b/game.py index ef6dc26..b2ea052 100644 --- a/game.py +++ b/game.py @@ -4388,15 +4388,16 @@ def happiness(world: dict, now: float) -> dict: supply = min(1.0, meals / want_meals) variety = min(1.0, kinds / FOOD_KINDS) needs = {"food": {"score": 0.0 if city["starving"] else 0.5 * supply + 0.5 * variety, "rows": [ - {"item": "bread", "label": "Food (any)", "have": int(meals), "want": want_meals, "any": "food"}, - {"item": "stew", "label": "Kinds of food", "have": kinds, "want": FOOD_KINDS, "kinds": True}, + {"item": "bread", "label": "Food", "have": int(meals), "want": want_meals, "any": "food"}, + {"item": "stew", "label": "Food variety", "have": kinds, "want": FOOD_KINDS, "kinds": True, + "day": math.ceil(day), "foods": {item: int(_meals(stock, item)) for item in FOOD_ORDER}}, ]}} season_now = season(world, now)["index"] burn = 24 * sum(hearth_burn(world, now)) fuel = sum(stock.get(item, 0) for item in FUEL) want_fuel = math.ceil(FUEL_DAYS * burn) needs["warmth"] = {"score": 0.0 if city.get("unheated") else min(1.0, fuel / want_fuel) if want_fuel else 1.0, - "rows": [{"item": "kindling", "label": "Firewood (any)", "have": fuel, "want": want_fuel, + "rows": [{"item": "kindling", "label": "Firewood", "have": fuel, "want": want_fuel, "any": "fuel"}]} garment, later = SEASON_CLOTHES[season_now], SEASON_CLOTHES[(season_now + 1) % 4] rows = [{"item": garment, "label": ITEMS[garment]["plural"], "have": stock.get(garment, 0), "want": math.ceil(pop)}] diff --git a/static/app.js b/static/app.js index 9b9b3b3..68687a1 100644 --- a/static/app.js +++ b/static/app.js @@ -2362,7 +2362,13 @@ function reqRow(r) { const link = goto(r.item, Boolean(r.any || r.kinds)), tip = link ? ` title="${esc(gotoTip(r.item).trim())}"` : ""; return `