diff --git a/agent.py b/agent.py index 8555342..02eb3eb 100644 --- a/agent.py +++ b/agent.py @@ -383,43 +383,40 @@ def _asset_body(asset_type: str, style: str, primary: str, accent: str, dark: st fill = "none" if style == "outline" else primary common = f'stroke="{dark}" stroke-width="{stroke}" stroke-linejoin="round" stroke-linecap="round"' - def p(amount: float) -> str: - return _scale(unit, amount) - if asset_type == "character": return ( - f'' - f'' - f'' + f'' + f'' + f'' ) if asset_type == "enemy": spike_points: list[str] = [] for i in range(7): - spike_points.append(f'{p(2 + i * 2)},{p(7 + ((pattern + i) % 3))}') + spike_points.append(f'{_scale(unit, 2 + i * 2)},{_scale(unit, 7 + ((pattern + i) % 3))}') spike_points_text = " ".join(spike_points) return ( - f'' + f'' f'' - f'' + f'' ) if asset_type == "item": return ( - f'' - f'' + f'' + f'' ) if asset_type == "tile": tiles: list[str] = [] for x in (2, 5, 8, 11): for y in (2, 5, 8, 11): color = primary if (x + y + pattern) % 2 else accent - tiles.append(f'') + tiles.append(f'') return "".join(tiles) if asset_type == "projectile": return ( - f'' - f'' + f'' + f'' ) return ( - f'' - f'' + f'' + f'' )