Icons: game-icons.net glyphs tinted per tier, built into one sprite

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-19 10:04:38 +01:00
parent 2eed9b7ec4
commit 5cc5b98d61
7 changed files with 314 additions and 18 deletions

View file

@ -995,5 +995,15 @@ class HappeningsTest(unittest.TestCase):
self.assertIsNotNone(world["next_fortune_at"])
class IconTest(unittest.TestCase):
def test_everything_has_a_glyph_in_the_sprite(self):
sprite = (Path(__file__).resolve().parent.parent / "static" / "icons.svg").read_text()
missing = [name for name in game.all_glyphs() if f'id="{name}"' not in sprite]
self.assertEqual(missing, [], "run tools/build_icons.py")
for item, spec in game.ITEMS.items():
self.assertIn("glyph", spec, item)
if __name__ == "__main__":
unittest.main()