Skip to content

Commit 562d6e3

Browse files
committed
Do not show debug ship arrows
1 parent 0f21001 commit 562d6e3

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

src/components/game/ui/Minimap.tsx

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -245,24 +245,25 @@ export function Minimap() {
245245
)
246246
})}
247247

248-
{/* AI ships */}
249-
{aiShips.map((ai) => {
250-
const pos = worldToMinimap(ai.position[0], ai.position[2])
251-
const rotation = -ai.rotation * (180 / Math.PI) + 225
252-
return (
253-
<g
254-
key={ai.id}
255-
transform={`translate(${pos.x}, ${pos.y}) rotate(${rotation}) scale(${scale})`}
256-
>
257-
<polygon
258-
points="0,-4 3,3 0,1.5 -3,3"
259-
fill={ai.color || '#e74c3c'}
260-
stroke="white"
261-
strokeWidth={1}
262-
/>
263-
</g>
264-
)
265-
})}
248+
{/* AI ships (debug only) */}
249+
{debugMode &&
250+
aiShips.map((ai) => {
251+
const pos = worldToMinimap(ai.position[0], ai.position[2])
252+
const rotation = -ai.rotation * (180 / Math.PI) + 225
253+
return (
254+
<g
255+
key={ai.id}
256+
transform={`translate(${pos.x}, ${pos.y}) rotate(${rotation}) scale(${scale})`}
257+
>
258+
<polygon
259+
points="0,-4 3,3 0,1.5 -3,3"
260+
fill={ai.color || '#e74c3c'}
261+
stroke="white"
262+
strokeWidth={1}
263+
/>
264+
</g>
265+
)
266+
})}
266267

267268
{/* Boat arrow */}
268269
<g
@@ -278,9 +279,11 @@ export function Minimap() {
278279
</g>
279280

280281
{/* Debug: show AI count and world boundary */}
281-
<text x={5} y={12} fill="yellow" fontSize={8 * scale}>
282-
AI: {aiShips.length} | WB: {boatState.worldBoundary}
283-
</text>
282+
{debugMode && (
283+
<text x={5} y={12} fill="yellow" fontSize={8 * scale}>
284+
AI: {aiShips.length} | WB: {boatState.worldBoundary}
285+
</text>
286+
)}
284287
</svg>
285288
</div>
286289
)

0 commit comments

Comments
 (0)