- added sounds for all hotlist sounds

This commit is contained in:
2025-10-20 11:32:45 +01:00
parent a152c15ec7
commit 0867b3b743
5 changed files with 63 additions and 18 deletions

View File

@@ -3,15 +3,16 @@ import type { SoundAction, SoundState } from "../../types/types";
export const initialState: SoundState = {
sightingSound: "switch",
NPEDsound: "popup",
hotlistSound: "warning",
hotlists: [{ name: "hotlistName", sound: "notification" }],
soundOptions: [
{ name: "Switch (Default)", soundFile: "switch" },
{ name: "Popup", soundFile: "popup" },
{ name: "Notification", soundFile: "notification" },
{ name: "Beep", soundFile: "beep" },
{ name: "Ding", soundFile: "ding" },
{ name: "Shutter", soundFile: "shutter" },
{ name: "Warning (voice)", soundFile: "warning" },
{ name: "Switch (Default)", soundFileName: "switch" },
{ name: "Popup", soundFileName: "popup" },
{ name: "Notification", soundFileName: "notification" },
{ name: "Beep", soundFileName: "beep" },
{ name: "Ding", soundFileName: "ding" },
{ name: "Shutter", soundFileName: "shutter" },
{ name: "Warning (voice)", soundFileName: "warning" },
],
sightingVolume: 1,
NPEDsoundVolume: 1,
@@ -25,12 +26,14 @@ export function reducer(state: SoundState, action: SoundAction): SoundState {
...state,
sightingSound: action.payload.sightingSound,
NPEDsound: action.payload.NPEDsound,
hotlistSound: action.payload.hotlistSound,
hotlists: action.payload.hotlists?.map((hotlist) => ({
name: hotlist.name,
sound: hotlist.sound,
})),
NPEDsoundVolume: action.payload.NPEDsoundVolume,
sightingVolume: action.payload.sightingVolume,
hotlistSoundVolume: action.payload.hotlistSoundVolume,
};
}
@@ -53,6 +56,12 @@ export function reducer(state: SoundState, action: SoundAction): SoundState {
NPEDsoundVolume: action.payload,
};
case "HOTLISTVOLUME":
return {
...state,
hotlistSoundVolume: action.payload,
};
default:
return state;
}