From 0f49035e4fba6a0c7878045664148bb19d807434 Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 18 Sep 2026 05:28:57 +0000 Subject: [PATCH] Cover analog helm and broadside cooldowns --- tests/wiring.test.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/wiring.test.mjs b/tests/wiring.test.mjs index 52217dd..a53b0fe 100644 --- a/tests/wiring.test.mjs +++ b/tests/wiring.test.mjs @@ -143,3 +143,14 @@ test('uploaded top HUD uses its new aspect ratio', async () => { assert.match(source, /\.steam-top \{[\s\S]*?aspect-ratio: 960 \/ 246/); assert.match(source, /@media \(min-width: 700px\)[\s\S]*?\.steam-top \{[\s\S]*?aspect-ratio: 960 \/ 246/); }); + + +test('game consumes analog helm vector and keeps broadside cooldowns independent', async () => { + const source = await read('src/game-v4.js'); + + assert.match(source, /addEventListener\('airship:helm-vector', this\.handleHelmVector\)/); + assert.match(source, /const throttleForward = this\.cursors\.up\.isDown \? 1 : Math\.max\(0, -helmY\)/); + assert.match(source, /const turnInput = keyboardTurn \|\| helmX/); + assert.match(source, /const broadside = side < 0 \? 'port' : 'starboard'/); + assert.match(source, /this\.lastPlayerShot\[broadside\]/); +});