diff tools/build.py @ 2:3dd5b745fa08

updated art with inked drawings
author ark
date 2026-10-18 15:08 +0200
parents 5492efd60e2c
children 2d46729a022e
line wrap: on
line diff
--- a/tools/build.py	Sun Oct 18 14:50:20 2026 +0200
+++ b/tools/build.py	Sun Oct 18 15:08:34 2026 +0200
@@ -405,9 +405,10 @@
 
 # 7. previews
 
-def step_previews(maps, force, changed):
+def step_previews(cfg, maps, force, changed):
     outputs = [PREVIEW / f"map{m}.png" for m in range(MAPS)] + [PREVIEW / "towers.png"]
-    if not changed and not stale([], outputs, force):
+    # the tower sheet shows the pivots from game.toml
+    if not changed and not stale([CONFIG / "game.toml"], outputs, force):
         print("previews: up to date")
         return
     PREVIEW.mkdir(parents=True, exist_ok=True)
@@ -415,7 +416,7 @@
         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).save(PREVIEW / "towers.png")
+    preview.tower_sheet(ASSETS, cfg["art"]["pivot"]).save(PREVIEW / "towers.png")
     print(f"previews: wrote {PREVIEW.relative_to(ROOT)}/")
 
 
@@ -433,7 +434,7 @@
     maps, masks_changed = step_masks(cfg, force)
     step_config(cfg, force, changed)
     step_checks(cfg, maps)
-    step_previews(maps, force, changed or masks_changed)
+    step_previews(cfg, maps, force, changed or masks_changed)
     print(f"\n{len(warnings)} warning(s)")
     return True