diff tools/build.py @ 16:30bd10284fd8

added ./game to .hgignore
author ark
date 2026-10-19 23:47 +0200
parents c1c7e4f54bf6
children fe680946164b
line wrap: on
line diff
--- a/tools/build.py	Mon Oct 19 23:36:08 2026 +0200
+++ b/tools/build.py	Mon Oct 19 23:47:22 2026 +0200
@@ -506,7 +506,7 @@
 
 def step_previews(cfg, maps, force, changed):
     outputs = [PREVIEW / f"map{m}.png" for m in range(MAPS)] + [PREVIEW / "towers.png"]
-    # the tower sheet shows the pivots from game.toml
+    # the tower sheet shows the pivots, footprint and sprite scale from game.toml
     if not changed and not stale([CONFIG / "game.toml"], outputs, force):
         print("previews: up to date")
         return
@@ -515,7 +515,8 @@
         preview.map_preview(ART / f"map{m}.png", mp).save(PREVIEW / f"map{m}.png")
         if len(mp["routes"]) > 1:
             preview.route_sheet(ART / f"map{m}.png", mp).save(PREVIEW / f"map{m}_routes.png")
-    preview.tower_sheet(ASSETS, cfg["art"]["pivot"]).save(PREVIEW / "towers.png")
+    preview.tower_sheet(ASSETS, cfg["art"]["pivot"], cfg["placement"]["footprint_radius"],
+                        cfg["scale"]["sprite"]).save(PREVIEW / "towers.png")
     print(f"previews: wrote {PREVIEW.relative_to(ROOT)}/")