Unleash the PUG linter

This commit is contained in:
Natsumi
2025-01-27 12:28:08 +13:00
parent ca6b52c053
commit cc1a1fbd6a
30 changed files with 6904 additions and 3041 deletions

View File

@@ -185,23 +185,33 @@ export default class extends baseClass {
}
const notiConditions = {
'Always': () => true,
Always: () => true,
'Inside VR': () => this.isSteamVRRunning,
'Outside VR': () => !this.isSteamVRRunning,
'Game Closed': () => !this.isGameRunning, // Also known as "Outside VRChat"
'Game Running': () => this.isGameRunning, // Also known as "Inside VRChat"
'Desktop Mode': () => this.isGameNoVR && this.isGameRunning,
'AFK': () => this.afkDesktopToast && this.isHmdAfk && this.isGameRunning && !this.isGameNoVR,
AFK: () =>
this.afkDesktopToast &&
this.isHmdAfk &&
this.isGameRunning &&
!this.isGameNoVR
};
const playNotificationTTS = notiConditions[this.notificationTTS]?.();
const playDesktopToast = notiConditions[this.desktopToast]?.() || notiConditions['AFK']();
const playNotificationTTS =
notiConditions[this.notificationTTS]?.();
const playDesktopToast =
notiConditions[this.desktopToast]?.() ||
notiConditions['AFK']();
const playOverlayToast = notiConditions[this.overlayToast]?.();
const playOverlayNotification = this.overlayNotifications && playOverlayToast;
const playOverlayNotification =
this.overlayNotifications && playOverlayToast;
const playXSNotification = this.xsNotifications && playOverlayToast;
const playOvrtHudNotifications = this.ovrtHudNotifications && playOverlayToast;
const playOvrtWristNotifications = this.ovrtWristNotifications && playOverlayToast;
const playOvrtHudNotifications =
this.ovrtHudNotifications && playOverlayToast;
const playOvrtWristNotifications =
this.ovrtWristNotifications && playOverlayToast;
var message = '';
if (noty.title) {
@@ -1299,7 +1309,11 @@ export default class extends baseClass {
if (WINDOWS) {
AppApi.DesktopNotification(displayName, message, image);
} else {
window.electron.desktopNotification(displayName, message, image);
window.electron.desktopNotification(
displayName,
message,
image
);
}
},