Skip to content

Commit

Permalink
Merge branch 'develop' into steam-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphiiko committed Sep 23, 2024
2 parents 3cc5205 + 2f58b26 commit e5eee7a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src-ui/app/models/one-time-flags.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export const OneTimeFlags = ['CCT_CONTROL_WARNING_DIALOG'] as const;
export const OneTimeFlags = [
'CCT_CONTROL_WARNING_DIALOG',
'BASESTATION_COUNT_WARNING_DIALOG',
] as const;

export type OneTimeFlag = (typeof OneTimeFlags)[number];
2 changes: 0 additions & 2 deletions src-ui/app/services/app-settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export class AppSettingsService {
public updateSettings(settings: Partial<AppSettings>) {
const newSettings = Object.assign(structuredClone(this._settings.value), settings);
if (isEqual(newSettings, this._settings.value)) return;
console.log('UPDATED SETTINGS 1', structuredClone(this._settings.value.oneTimeFlags));
this._settings.next(newSettings);
}

Expand All @@ -89,7 +88,6 @@ export class AppSettingsService {
const oneTimeFlags = [...this._settings.value.oneTimeFlags];
if (set) oneTimeFlags.push(flag);
else if (oneTimeFlags.indexOf(flag) > -1) oneTimeFlags.splice(oneTimeFlags.indexOf(flag), 1);
console.log('UPDATING ONE TIME FLAGS', oneTimeFlags);
this.updateSettings({ oneTimeFlags: uniq(oneTimeFlags) });
}

Expand Down
13 changes: 13 additions & 0 deletions src-ui/app/services/lighthouse.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { invoke } from '@tauri-apps/api';
import { listen } from '@tauri-apps/api/event';
import {
asyncScheduler,
BehaviorSubject,
debounceTime,
delay,
Expand All @@ -15,6 +16,7 @@ import {
of,
shareReplay,
take,
throttleTime,
} from 'rxjs';
import { LighthouseDevice, LighthouseDevicePowerState } from '../models/lighthouse-device';
import { AppSettingsService } from './app-settings.service';
Expand Down Expand Up @@ -98,6 +100,17 @@ export class LighthouseService {
await invoke('lighthouse_reset');
}
});
this._devices
.pipe(
filter((d) => d.length >= 6),
throttleTime(60000, asyncScheduler, {
leading: true,
trailing: true,
})
)
.subscribe(() =>
this.appSettings.promptDialogForOneTimeFlag('BASESTATION_COUNT_WARNING_DIALOG')
);
}

async scan() {
Expand Down
6 changes: 5 additions & 1 deletion src-ui/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,10 @@
"GOGO_LOCO_LEGACY_PRESET_WARNING": "This preset uses a workaround that has some issues. Please only use this preset if you can't use the newer GoGo Loco preset. If your avatar still uses an older version of GoGo Loco, it is recommended that you update your avatar to use the latest GoGo Loco version.",
"GORONE_LEGACY_PRESET_WARNING": "Versions v4.0 and up of this prefab already contain turning functionality, and are not compatible with this preset. This preset is still available if your avatar uses older versions of this prefab.",
"oneTimeFlagDialogs": {
"BASESTATION_COUNT_WARNING_DIALOG": {
"message": "It looks like you have a lot of base stations!\n\nBe warned that most Bluetooth adapters can only handle 7 simultaneous connections, including other Bluetooth devices like headphones and other peripherals.\n\nKeep in mind that OyasumiVR might have trouble controlling all of your base stations if you have too many of them plugged in at the same time, or have too many other Bluetooth devices connected.",
"title": "Warning"
},
"CCT_CONTROL_WARNING_DIALOG": {
"message": "Please note that display color temperature control is only available with certain native SteamVR headsets, e.g. the Valve Index, Bigscreen Beyond, or HTC Vive (Pro).\n\nIf you do not use one of these headsets, this feature likely will have no effect for you.\n\nYou can disable display color temperature control in the settings if you want to.",
"title": "Feature Availability"
Expand Down Expand Up @@ -2565,4 +2569,4 @@
},
"title": "VRChat Microphone Mute Automations"
}
}
}

0 comments on commit e5eee7a

Please sign in to comment.