- added volume setting for sighting hits

This commit is contained in:
2025-10-17 16:12:02 +01:00
parent 3eb539fd9d
commit 82b84dc46e
14 changed files with 145 additions and 59 deletions

View File

@@ -13,6 +13,9 @@ export const initialState: SoundState = {
{ name: "Shutter", soundFile: "shutter" },
{ name: "Warning (voice)", soundFile: "warning" },
],
sightingVolume: 1,
NPEDsoundVolume: 1,
hotlistSoundVolume: 1,
};
export function reducer(state: SoundState, action: SoundAction): SoundState {
@@ -35,6 +38,18 @@ export function reducer(state: SoundState, action: SoundAction): SoundState {
soundOptions: [...(state.soundOptions ?? []), action.payload],
};
}
// todo: refactor to use single state coupled with sound name. e.g : {name: <soundname>, volume: <volume>}
case "SIGHTINGVOLUME":
return {
...state,
sightingVolume: action.payload,
};
case "NPEDVOLUME":
return {
...state,
NPEDsoundVolume: action.payload,
};
default:
return state;