diff --git a/agent.py b/agent.py
index fa749e2..8555342 100644
--- a/agent.py
+++ b/agent.py
@@ -330,8 +330,8 @@ def _slugify(value: str) -> str:
return slug or "game-asset"
-def _scale(unit: float, n: float) -> str:
- return f"{n * unit:.2f}"
+def _scale(unit: float, amount: float) -> str:
+ return f"{amount * unit:.2f}"
def _render_svg(
@@ -382,7 +382,10 @@ def _render_svg(
def _asset_body(asset_type: str, style: str, primary: str, accent: str, dark: str, stroke: int, unit: float, pattern: int) -> str:
fill = "none" if style == "outline" else primary
common = f'stroke="{dark}" stroke-width="{stroke}" stroke-linejoin="round" stroke-linecap="round"'
- p = lambda n: _scale(unit, n)
+
+ def p(amount: float) -> str:
+ return _scale(unit, amount)
+
if asset_type == "character":
return (
f''
@@ -393,9 +396,10 @@ def _asset_body(asset_type: str, style: str, primary: str, accent: str, dark: st
spike_points: list[str] = []
for i in range(7):
spike_points.append(f'{p(2 + i * 2)},{p(7 + ((pattern + i) % 3))}')
+ spike_points_text = " ".join(spike_points)
return (
f''
- f''
+ f''
f''
)
if asset_type == "item":