Added Pilot Filter functionality

This commit is contained in:
PxlLoewe
2025-07-15 23:47:13 -07:00
parent 46fdd2e0c2
commit fc698b22d7
7 changed files with 124 additions and 12 deletions

View File

@@ -27,6 +27,14 @@ interface ConnectionStore {
debug?: boolean,
) => Promise<void>;
disconnect: () => void;
followOwnAircraft: boolean;
showOtherAircrafts: boolean;
showOtherMissions: boolean;
setMapOptions: (options: {
followOwnAircraft?: boolean;
showOtherAircrafts?: boolean;
showOtherMissions?: boolean;
}) => void;
}
export const usePilotConnectionStore = create<ConnectionStore>((set) => ({
@@ -37,7 +45,15 @@ export const usePilotConnectionStore = create<ConnectionStore>((set) => ({
connectedAircraft: null,
activeMission: null,
debug: false,
followOwnAircraft: false,
showOtherAircrafts: false,
showOtherMissions: false,
setMapOptions(options) {
set((state) => ({
...state,
...options,
}));
},
connect: async (uid, stationId, logoffTime, station, user, debug) =>
new Promise((resolve) => {
set({