Cover analog helm and broadside cooldowns

This commit is contained in:
Admin 2026-09-18 05:28:57 +00:00
parent d786a1a416
commit 0f49035e4f

View File

@ -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, /\.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/); 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\]/);
});