From b13a1c16f16912cb0cb2cac6a37fcb525b37969a Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 6 Jan 2024 12:04:07 +0000 Subject: [PATCH 1/5] chore: upgrade to .NET 8 --- Dockerfile | 4 ++-- VPLink.Common/VPLink.Common.csproj | 2 +- VPLink.Tests/VPLink.Tests.csproj | 2 +- VPLink/VPLink.csproj | 2 +- global.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 169ec52..9ddebf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base +FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base WORKDIR /app -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ["VPLink/VPLink.csproj", "VPLink/"] RUN dotnet restore "VPLink/VPLink.csproj" diff --git a/VPLink.Common/VPLink.Common.csproj b/VPLink.Common/VPLink.Common.csproj index d052804..daf555a 100644 --- a/VPLink.Common/VPLink.Common.csproj +++ b/VPLink.Common/VPLink.Common.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/VPLink.Tests/VPLink.Tests.csproj b/VPLink.Tests/VPLink.Tests.csproj index 1c1233e..92fc731 100644 --- a/VPLink.Tests/VPLink.Tests.csproj +++ b/VPLink.Tests/VPLink.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable false diff --git a/VPLink/VPLink.csproj b/VPLink/VPLink.csproj index cf34467..0f8dd52 100644 --- a/VPLink/VPLink.csproj +++ b/VPLink/VPLink.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 enable enable Linux diff --git a/global.json b/global.json index 36e1a9e..b5b37b6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.0", + "version": "8.0.0", "rollForward": "latestMajor", "allowPrerelease": false } From e71b311a7042ebb7b3c6990d908cd66107212233 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 6 Jan 2024 12:05:00 +0000 Subject: [PATCH 2/5] chore: update vpsdk to 20240102 (e6701b5e) --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ddebf9..0a18f83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN dotnet publish "VPLink.csproj" -c Release -o /app/publish FROM base AS vpsdk WORKDIR /vpsdk -ADD http://static.virtualparadise.org/dev-downloads/vpsdk_20231217_422bcbfc_linux_debian10_x86_64.tar.gz ./vpsdk.tar.gz -RUN echo "5F5710EEFC1FC2C5246434A52B9DC05F477A6EFE91394001FAA4097F5CA7BC77 vpsdk.tar.gz" | sha256sum -c -&& \ +ADD http://edwin-share.virtualparadise.org/2024/01/vpsdk_20240102_e6701b5e_linux_debian10_x86_64 ./vpsdk.tar.gz +RUN echo "5784270749FFC3AD31EFF9BA7DD82203C31968C60DD732A4F76CBB2947C1DB6D vpsdk.tar.gz" | sha256sum -c -&& \ tar xfv vpsdk.tar.gz --strip-components=1 && \ rm -r vpsdk.tar.gz include From 1008d267cce40bdc273d97166e926ddfbaed545e Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 6 Jan 2024 12:07:26 +0000 Subject: [PATCH 3/5] chore: update dependencies - Serilog.Extensions.Hosting 8.0.0 - Serilog.Sinks.Console 5.0.1 - Discord.Net 3.13.0 - Microsoft.NET.Test.Sdk 17.8.0 - NSubstitute 5.1.0 - NUnit 4.0.1 - NUnit.Analyzsers 3.10.0 --- VPLink.Common/VPLink.Common.csproj | 2 +- VPLink.Tests/VPLink.Tests.csproj | 8 ++++---- VPLink/VPLink.csproj | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VPLink.Common/VPLink.Common.csproj b/VPLink.Common/VPLink.Common.csproj index daf555a..796fad4 100644 --- a/VPLink.Common/VPLink.Common.csproj +++ b/VPLink.Common/VPLink.Common.csproj @@ -7,7 +7,7 @@ - + diff --git a/VPLink.Tests/VPLink.Tests.csproj b/VPLink.Tests/VPLink.Tests.csproj index 92fc731..d9a563d 100644 --- a/VPLink.Tests/VPLink.Tests.csproj +++ b/VPLink.Tests/VPLink.Tests.csproj @@ -11,11 +11,11 @@ - - - + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/VPLink/VPLink.csproj b/VPLink/VPLink.csproj index 0f8dd52..b39e841 100644 --- a/VPLink/VPLink.csproj +++ b/VPLink/VPLink.csproj @@ -37,8 +37,8 @@ - - + + From c093a701f88e07e045e970dc3759e31d1362cf34 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 6 Jan 2024 12:11:06 +0000 Subject: [PATCH 4/5] fix: suppress events if current world is null --- VPLink/Services/VirtualParadiseMessageService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VPLink/Services/VirtualParadiseMessageService.cs b/VPLink/Services/VirtualParadiseMessageService.cs index 48f0117..c730b01 100644 --- a/VPLink/Services/VirtualParadiseMessageService.cs +++ b/VPLink/Services/VirtualParadiseMessageService.cs @@ -43,6 +43,8 @@ internal sealed class VirtualParadiseMessageService : BackgroundService, IVirtua /// public Task SendMessageAsync(RelayedMessage message) { + if (_virtualParadiseClient.CurrentWorld is null) return Task.CompletedTask; + IChatConfiguration configuration = _configurationService.VirtualParadiseConfiguration.Chat; Color color = Color.FromArgb((int)(message.IsReply ? configuration.ReplyColor : configuration.Color)); @@ -62,6 +64,7 @@ internal sealed class VirtualParadiseMessageService : BackgroundService, IVirtua private void OnVPMessageReceived(VirtualParadiseMessage message) { if (message is null) throw new ArgumentNullException(nameof(message)); + if (_virtualParadiseClient.CurrentWorld is null) return; if (message.Type != MessageType.ChatMessage) return; if (message.Author == _virtualParadiseClient.CurrentAvatar) return; if (message.Author.IsBot && !_configurationService.BotConfiguration.RelayBotMessages) return; From 6dcd086274b23e60082094814fab65fede1d9020 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 6 Jan 2024 12:56:05 +0000 Subject: [PATCH 5/5] chore: update VpSharp 1.0.0-nightly.45 --- VPLink/VPLink.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VPLink/VPLink.csproj b/VPLink/VPLink.csproj index b39e841..9620466 100644 --- a/VPLink/VPLink.csproj +++ b/VPLink/VPLink.csproj @@ -42,7 +42,7 @@ - +