1
0
mirror of https://github.com/oliverbooth/VPLink synced 2024-11-22 23:58:46 +00:00

Merge branch 'release/2.0.0'

This commit is contained in:
Oliver Booth 2024-01-06 12:56:32 +00:00
commit f504b3b034
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
6 changed files with 19 additions and 16 deletions

View File

@ -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"
@ -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

View File

@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Discord.Net" Version="3.12.0"/>
<PackageReference Include="Discord.Net" Version="3.13.0"/>
<PackageReference Include="Humanizer.Core" Version="2.14.1"/>
<PackageReference Include="VpSharp" Version="0.1.0-nightly.43"/>
</ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
@ -11,11 +11,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0"/>
<PackageReference Include="NSubstitute" Version="5.0.0"/>
<PackageReference Include="NUnit" Version="3.13.3"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="NSubstitute" Version="5.1.0"/>
<PackageReference Include="NUnit" Version="4.0.1"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
<PackageReference Include="NUnit.Analyzers" Version="3.6.1"/>
<PackageReference Include="NUnit.Analyzers" Version="3.10.0"/>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

View File

@ -43,6 +43,8 @@ internal sealed class VirtualParadiseMessageService : BackgroundService, IVirtua
/// <inheritdoc />
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;

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
@ -37,12 +37,12 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
<PackageReference Include="Serilog" Version="3.1.1"/>
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0"/>
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0"/>
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0"/>
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1"/>
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0"/>
<PackageReference Include="System.Reactive" Version="6.0.0"/>
<PackageReference Include="Tomlyn.Extensions.Configuration" Version="1.0.5"/>
<PackageReference Include="VpSharp" Version="0.1.0-nightly.44"/>
<PackageReference Include="VpSharp" Version="1.0.0-nightly.45"/>
<PackageReference Include="X10D" Version="3.3.1"/>
<PackageReference Include="X10D.Hosting" Version="3.3.1"/>
<PackageReference Include="ZString" Version="2.5.0"/>

View File

@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.0",
"version": "8.0.0",
"rollForward": "latestMajor",
"allowPrerelease": false
}