horn limits and such

This commit is contained in:
legop3
2026-01-31 16:11:24 -05:00
parent 92c9ae4834
commit c24ae71e63
16 changed files with 203 additions and 142 deletions
+9
View File
@@ -30,6 +30,7 @@ function createSongState() {
function createHornState() {
return {
active: false,
cooldownUntil: 0,
};
}
@@ -144,6 +145,14 @@ export function controlReducer(state, action) {
active: Boolean(action.payload),
},
};
case 'control/set-horn-cooldown':
return {
...state,
horn: {
...(state.horn || createHornState()),
cooldownUntil: typeof action.payload === 'number' ? action.payload : 0,
},
};
case 'control/record-intent':
return {
...state,