diff tools/build.py @ 24:3f2811aebb3d 0.9.0

splash screen buttons, help button, info screen
author ark
date 2026-10-20 15:58 +0200
parents 2f555a54c332
children 75deda08db90
line wrap: on
line diff
--- a/tools/build.py	Tue Oct 20 12:04:42 2026 +0200
+++ b/tools/build.py	Tue Oct 20 15:58:17 2026 +0200
@@ -59,7 +59,8 @@
               "shop_bubble", "shop_bubble_dark", "shop_bubble_dark2", "tower_popup",
               "upgrade_button", "sell_button", "monster_death", "boss_death",
               "splash", "splash_play", "map_won", "map_won_button",
-              "game_lost", "game_lost_button", "game_won", "game_won_button"])
+              "game_lost", "game_lost_button", "game_won", "game_won_button",
+              "wobbly_logo", "help_splash", "help_button", "help_info", "freeze"])
 # hp bar variants (art.md): the empty part is a darkened copy, the bar of a
 # slowed monster has its colour set to this hue in degrees
 BAR_DARKEN = 0.35
@@ -312,7 +313,7 @@
     """raise ConfigError on missing or malformed settings."""
     for sec in ("scale", "monster", "animation", "movement", "route_preference", "tower",
                 "placement", "waves", "hearts", "coins", "controls", "art", "debug",
-                "sound", "map"):
+                "sound", "links", "map"):
         if sec not in cfg:
             raise ConfigError(f"section [{sec}] missing")
     for mid, mon in cfg["monster"].items():
@@ -320,7 +321,7 @@
             need(mon, k, float, f"monster.{mid}")
     for tid, tw in cfg["tower"].items():
         for k in TOWER_BY_LEVEL:
-            if k == "slow" and k not in tw:
+            if k in ("slow", "damage") and k not in tw:
                 continue
             v = need(tw, k, list, f"tower.{tid}")
             if len(v) != 2 or not all(isinstance(x, (int, float)) and not isinstance(x, bool)
@@ -330,6 +331,10 @@
         for k in ("attack_time", "projectile_speed"):
             need(tw, k, float, f"tower.{tid}")
         need(tw, "projectile", str, f"tower.{tid}")
+        if "splash_radius" in tw:
+            need(tw, "splash_radius", float, f"tower.{tid}")
+    for k in ("logo_url", "email", "email_subject"):
+        need(cfg["links"], k, str, "links")
     for k in ("speed_variation", "offset", "lean", "wander_step", "fade_in"):
         need(cfg["movement"], k, float, "movement")
     for k in ("footprint_radius", "max_gap", "min_tower_distance", "edge_distance",