diff --git a/Dotnet/IPC/IPCServer.cs b/Dotnet/IPC/IPCServer.cs index b44f99f3..cfbce27e 100644 --- a/Dotnet/IPC/IPCServer.cs +++ b/Dotnet/IPC/IPCServer.cs @@ -33,10 +33,20 @@ namespace VRCX client?.Send(ipcPacket); } } + + public static string GetIpcName() + { + var hash = 0; + foreach (var c in Environment.UserName) + { + hash += c; + } + return $"vrcx-ipc-{hash}"; + } public void CreateIPCServer() { - var ipcServer = new NamedPipeServerStream("vrcx-ipc", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous); + var ipcServer = new NamedPipeServerStream(GetIpcName(), PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous); ipcServer.BeginWaitForConnection(DoAccept, ipcServer); } diff --git a/Dotnet/StartupArgs.cs b/Dotnet/StartupArgs.cs index ecee3115..020a7b6c 100644 --- a/Dotnet/StartupArgs.cs +++ b/Dotnet/StartupArgs.cs @@ -133,7 +133,7 @@ namespace VRCX private static void IPCToMain() { new IPCServer().CreateIPCServer(); - var ipcClient = new NamedPipeClientStream(".", "vrcx-ipc", PipeDirection.InOut); + var ipcClient = new NamedPipeClientStream(".", IPCServer.GetIpcName(), PipeDirection.InOut); ipcClient.Connect(); if (ipcClient.IsConnected) diff --git a/html/src/app.js b/html/src/app.js index a85901b8..8d4a3876 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -3660,6 +3660,9 @@ speechSynthesis.getVoices(); isSteamVRRunning, isHmdAfk ) { + if (this.gameLogDisabled) { + return; + } if (isGameRunning !== this.isGameRunning) { this.isGameRunning = isGameRunning; if (isGameRunning) { @@ -17496,7 +17499,7 @@ speechSynthesis.getVoices(); var args = await API.call(`file/${fileId}`); var imageUrl = args.versions[1].file.url; var createdAt = args.versions[0].created_at; - var path = `${createdAt.slice(0, 7)}`; + var path = createdAt.slice(0, 7); var fileNameDate = createdAt .replace(/:/g, '-') .replace(/T/g, '_') @@ -17684,20 +17687,32 @@ speechSynthesis.getVoices(); false ); - $app.methods.getPrintDate = function (print) { - var createdAt = new Date(); + $app.methods.getPrintLocalDate = function (print) { if (print.createdAt) { - createdAt = new Date(print.createdAt); - } else if (print.timestamp) { - createdAt = new Date(print.timestamp); + var createdAt = new Date(print.createdAt); + // cursed convert to local time + createdAt.setMinutes( + createdAt.getMinutes() - createdAt.getTimezoneOffset() + ); + return createdAt; } + if (print.timestamp) { + var createdAt = new Date(print.timestamp); + return createdAt; + } + + var createdAt = new Date(); + // cursed convert to local time + createdAt.setMinutes( + createdAt.getMinutes() - createdAt.getTimezoneOffset() + ); return createdAt; }; $app.methods.getPrintFileName = function (print) { var authorName = print.authorName; // fileDate format: 2024-11-03_16-14-25.757 - var createdAt = this.getPrintDate(print); + var createdAt = this.getPrintLocalDate(print); var fileNameDate = createdAt .toISOString() .replace(/:/g, '-') @@ -17721,8 +17736,8 @@ speechSynthesis.getVoices(); console.error('Print image URL is missing', args); return; } - var createdAt = this.getPrintDate(args.json); - var path = `${createdAt.toISOString().slice(0, 7)}`; + var createdAt = this.getPrintLocalDate(args.json); + var path = createdAt.toISOString().slice(0, 7); var fileName = this.getPrintFileName(args.json); var status = await AppApi.SavePrintToFile(imageUrl, path, fileName); if (status) { @@ -19093,9 +19108,19 @@ speechSynthesis.getVoices(); break; } } - if (this.isRealInstance(location) && lastLocation !== location) { + if (lastLocation === location) { + return; + } + this.lastLocationDestination = ''; + this.lastLocationDestinationTime = 0; + + if (this.isRealInstance(location)) { var dt = new Date().toJSON(); var L = $utils.parseLocation(location); + + this.lastLocation.location = location; + this.lastLocation.date = dt; + var entry = { created_at: dt, type: 'Location', @@ -19113,6 +19138,9 @@ speechSynthesis.getVoices(); this.applyUserDialogLocation(); this.applyWorldDialogInstances(); this.applyGroupDialogInstances(); + } else { + this.lastLocation.location = ''; + this.lastLocation.date = ''; } }; @@ -20594,7 +20622,9 @@ speechSynthesis.getVoices(); ref.name.toLowerCase().includes(search) || ref.authorName.toLowerCase().includes(search) ) { - if (!results.some(r => r.id == ref.id)) results.push(ref); + if (!results.some((r) => r.id == ref.id)) { + results.push(ref); + } } } } @@ -20608,7 +20638,9 @@ speechSynthesis.getVoices(); ref.name.toLowerCase().includes(search) || ref.authorName.toLowerCase().includes(search) ) { - if (!results.some(r => r.id == ref.id)) results.push(ref); + if (!results.some((r) => r.id == ref.id)) { + results.push(ref); + } } } diff --git a/html/src/classes/discordRpc.js b/html/src/classes/discordRpc.js index f3a66b5a..e60657d1 100644 --- a/html/src/classes/discordRpc.js +++ b/html/src/classes/discordRpc.js @@ -25,7 +25,7 @@ export default class extends baseClass { } if ( !this.discordActive || - !this.isGameRunning || + (!this.isGameRunning && !this.gameLogDisabled) || (!currentLocation && !this.lastLocation$.tag) ) { this.setDiscordActive(false); diff --git a/html/src/classes/vrcxNotifications.js b/html/src/classes/vrcxNotifications.js index 70552104..d87e1f92 100644 --- a/html/src/classes/vrcxNotifications.js +++ b/html/src/classes/vrcxNotifications.js @@ -453,9 +453,7 @@ export default class extends baseClass { break; case 'invite': this.speak( - `${ - displayName - } has invited you to ${this.displayLocation( + `${displayName} has invited you to ${this.displayLocation( noty.details.worldId, noty.details.worldName, noty.groupName @@ -526,9 +524,7 @@ export default class extends baseClass { case 'PortalSpawn': if (displayName) { this.speak( - `${ - displayName - } has spawned a portal to ${this.displayLocation( + `${displayName} has spawned a portal to ${this.displayLocation( noty.instanceId, noty.worldName, noty.groupName diff --git a/html/src/localization/en/en.json b/html/src/localization/en/en.json index eee2fc90..66e3ebb9 100644 --- a/html/src/localization/en/en.json +++ b/html/src/localization/en/en.json @@ -443,7 +443,7 @@ }, "save_instance_stickers_to_file": { "header": "Save Instance Stickers To File", - "description": "Save dropped Stickers to your VRChat Pictures folder" + "description": "Save placed stickers to your VRChat Pictures folder" }, "remote_database": { "header": "Remote Avatar Database", diff --git a/html/src/mixins/dialogs/currentUser.pug b/html/src/mixins/dialogs/currentUser.pug index 7d893ae1..f78d84b4 100644 --- a/html/src/mixins/dialogs/currentUser.pug +++ b/html/src/mixins/dialogs/currentUser.pug @@ -182,7 +182,7 @@ mixin currentUser() span(v-else style="display:block")   display-name.x-ellipsis(v-if="image.authorId" :userid="image.authorId" :hint="image.authorName" style="color:#909399;font-family:monospace;display:block") span(v-else style="font-family:monospace;display:block")   - span.x-ellipsis(v-if="image.timestamp" style="color:#909399;font-family:monospace;font-size:11px;display:block") {{ image.timestamp | formatDate('long') }} + span.x-ellipsis(v-if="image.createdAt" style="color:#909399;font-family:monospace;font-size:11px;display:block") {{ image.createdAt | formatDate('long') }} span(v-else style="display:block")   div(style="float:right") el-button(type="default" @click="showFullscreenImageDialog(image.files.image, getPrintFileName(image))" size="mini" icon="el-icon-picture-outline" circle)