Icons: emoji become glyphs wherever the page draws, board text stays as typed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3486897630
commit
842ceaa10e
3 changed files with 123 additions and 8 deletions
44
game.py
44
game.py
|
|
@ -7730,9 +7730,46 @@ def _assign_glyphs() -> None:
|
|||
action["glyph"], action["tint"] = SKILL_GLYPHS[action["skill"]]
|
||||
|
||||
|
||||
# Emoji in the UI and in what the server sends are drawn as these glyphs wherever the page renders, see iconed() in app.js.
|
||||
_EMOJI_GLYPHS = {
|
||||
# kingdom, roads and war
|
||||
"🗺️": ("treasure-map", "#d9c6a0"), "🛤️": ("stone-path", "#b6a587"), "🐎": ("horse-head", "#b9844e"), "🚶": ("walk", "#b6a587"),
|
||||
"📍": ("position-marker", "#e2645c"), "🏠": ("house", "#d0a060"), "🏰": ("castle", "#a8a29e"), "💂": ("guards", "#c06a4a"),
|
||||
"⚔️": ("crossed-swords", "#d8574c"), "🛡️": ("checked-shield", "#8fb8d0"), "🐉": ("dragon-head", "#e05a5a"), "💀": ("death-skull", "#d9c6a0"),
|
||||
"📦": ("cardboard-box", "#b9844e"), "👥": ("backup", "#a9b4c0"), "👤": ("person", "#a9b4c0"), "🏆": ("trophy", "#e3c060"),
|
||||
"✍️": ("quill-ink", "#d9c6a0"), "📜": ("scroll-unfurled", "#e3c060"), "⛰️": ("peaks", "#a8a29e"), "🌲": ("pine-tree", "#5fae5a"),
|
||||
"🌊": ("big-wave", "#5aa0d8"), "🌾": ("wheat", "#e3c060"),
|
||||
# verdicts
|
||||
"✅": ("check-mark", "#5fae5a"), "❌": ("cancel", "#d8574c"), "⚠️": ("hazard-sign", "#e3a043"), "❓": ("uncertainty", "#a9b4c0"),
|
||||
"❔": ("uncertainty", "#a9b4c0"), "❗": ("hazard-sign", "#e3a043"),
|
||||
# navigation and the page furniture
|
||||
"🏘️": ("village", "#d0a060"), "💬": ("talk", "#a9b4c0"), "📰": ("newspaper", "#d9c6a0"), "🏦": ("bank", "#e3c060"), "📌": ("pin", "#e2645c"),
|
||||
"⏳": ("hourglass", "#c9b58a"), "⏱": ("stopwatch", "#c9b58a"), "⏭": ("fast-forward-button", "#a9b4c0"), "🔒": ("padlock", "#a9b4c0"),
|
||||
"🔨": ("claw-hammer", "#b9844e"), "🔥": ("flame", "#f0903e"), "🪵": ("wood-pile", "#b9844e"), "🌱": ("sprout", "#5fae5a"),
|
||||
"⚖️": ("scales", "#e3c060"), "🔧": ("spanner", "#a9b4c0"), "✨": ("sparkles", "#e3c060"), "🎉": ("party-popper", "#e3c060"), "🏁": ("checkered-flag", "#d9c6a0"),
|
||||
"🧪": ("round-bottom-flask", "#b98ce8"), "🙏": ("prayer", "#e9dfc6"), "🌬️": ("windy-stripes", "#a9c8d8"), "🤝": ("shaking-hands", "#d9c6a0"), "✋": ("hand", "#d9c6a0"),
|
||||
"❤️": ("hearts", "#e2645c"), "🦴": ("crossed-bones", "#e9dfc6"), "🎁": ("present", "#e2645c"), "🍞": ("sliced-bread", "#d9a860"), "🍲": ("hot-meal", "#d9a860"),
|
||||
"👕": ("shirt", "#a9c8d8"), "🥶": ("snowflake-1", "#a9c8d8"), "🏗️": ("crane", "#e3a043"), "🕵️": ("hooded-figure", "#8a7fd0"), "📯": ("hunting-horn", "#e0a050"),
|
||||
"🎒": ("backpack", "#b9844e"), "🐪": ("camel-head", "#d9a860"), "🐫": ("camel-head", "#d9a860"), "🧳": ("suitcase", "#b9844e"),
|
||||
# moods
|
||||
"😠": ("enrage", "#e2645c"), "😟": ("despair", "#e3a043"), "😐": ("meditation", "#a9b4c0"), "🙂": ("smitten", "#a0c060"), "😄": ("laurel-crown", "#5fae5a"),
|
||||
# seasons and weather
|
||||
"☀️": ("sun", "#e3c060"), "🍂": ("falling-leaf", "#d07a3c"), "❄️": ("snowflake-1", "#a9c8d8"), "🌤️": ("sun-cloud", "#e3c060"), "🌧️": ("raining", "#5aa0d8"),
|
||||
"🥵": ("heat-haze", "#e2645c"), "⛈️": ("lightning-storm", "#b98ce8"), "🌫️": ("fog", "#a9b4c0"), "🌨️": ("snowing", "#a9c8d8"),
|
||||
# troubles, hardships and fortunes
|
||||
"🐺": ("wolf-head", "#a9b4c0"), "🐻": ("bear-head", "#b9844e"), "🐗": ("boar", "#b9844e"), "👺": ("goblin-head", "#5fae5a"), "🕷️": ("spider-alt", "#a9b4c0"),
|
||||
"🐝": ("bee", "#e3c060"), "🐀": ("rat", "#a9b4c0"), "🦗": ("ant", "#a0c060"), "🏴☠️": ("pirate-flag", "#d9c6a0"), "🌉": ("stone-bridge", "#a8a29e"),
|
||||
"🪨": ("stone-block", "#a8a29e"), "🛢️": ("barrel", "#b9844e"), "✊": ("fist", "#e3a043"), "🤒": ("vomiting", "#a0c060"), "🥀": ("dead-wood", "#b9844e"),
|
||||
"🫨": ("earth-crack", "#b9844e"), "🏜️": ("heat-haze", "#d9a860"), "🎓": ("graduate-cap", "#8a7fd0"), "🎨": ("palette", "#e2645c"), "🫳": ("robber-hand", "#e3a043"),
|
||||
"🍄": ("mushroom-gills", "#d07a3c"), "🌪️": ("tornado", "#a9b4c0"), "👑": ("crown", "#e3c060"), "🐟": ("double-fish", "#5aa0d8"), "💎": ("cut-diamond", "#8fd0e0"),
|
||||
"🗡️": ("broadsword", "#a9b4c0"), "🦌": ("deer", "#b9844e"),
|
||||
}
|
||||
EMOJI_GLYPHS = {emoji.replace("\ufe0f", ""): glyph for emoji, glyph in _EMOJI_GLYPHS.items()}
|
||||
|
||||
|
||||
def all_glyphs() -> set[str]:
|
||||
"""Every glyph the game draws, for building the sprite."""
|
||||
names = set(UI_GLYPHS)
|
||||
names = set(UI_GLYPHS) | {name for name, _tint in EMOJI_GLYPHS.values()}
|
||||
for collection in (ITEMS.values(), SKILLS, CLASSES.values(), BUILDINGS.values(), PRAYERS, ACTIONS,
|
||||
combat.ABILITIES.values(), combat.ENEMY_ABILITIES.values()):
|
||||
names.update(entry["glyph"] for entry in collection)
|
||||
|
|
@ -7750,6 +7787,9 @@ ORDER_RECIPES, ORDER_RAW = _order_sources()
|
|||
# What changed, shown on the Patch notes page. Newest first; every shipped change adds a
|
||||
# line here (new / balance / fix), and a new release a new entry on top.
|
||||
PATCH_NOTES = [
|
||||
{"date": "2026-11-04", "title": "Icons", "notes": [
|
||||
("new", "Icons replace emoji across the game. Your own board messages stay as typed."),
|
||||
]},
|
||||
{"date": "2026-11-04", "title": "Caravans", "notes": [
|
||||
("new", "Caravans: carry goods between towns. 1h, 1,000 items per crew member. Everyone aboard stops work until it arrives."),
|
||||
("new", "Town stock: war council vote, then a caravan carries it. Crew earn 5% of its worth in favour at the far end."),
|
||||
|
|
@ -7965,7 +8005,7 @@ def content() -> dict:
|
|||
"resistant": RESISTANT, "jewel_stats": JEWEL_STATS, "stations": list(STATIONS), "class_style": CLASS_STYLE, "block_chance": BLOCK_CHANCE,
|
||||
"regen_per_hour": REGEN_PER_HOUR,
|
||||
"fires": FIRES, "flames": FLAMES, "firewood": FIREWOOD, "tend_xp": TEND_XP, "fire_low": FIRE_LOW,
|
||||
"patch_notes": PATCH_NOTES,
|
||||
"patch_notes": PATCH_NOTES, "emoji_glyphs": EMOJI_GLYPHS,
|
||||
"wares": {key: {**spec, "glyph": WARE_GLYPHS[key]} for key, spec in WARES.items()}, "cosmetics": COSMETICS, "free_looks": FREE_LOOKS, "homes": HOMES, "monuments": MONUMENTS,
|
||||
"guard_wage": GUARD_WAGE,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue