Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Impostor 1.9 #5

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.*
dotnet-version: 8.*

- name: Run the Cake script
uses: cake-build/cake-action@v1
Expand All @@ -24,17 +24,11 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: Reactor.Impostor.dll
path: Reactor.Impostor/bin/Release/net7.0/Reactor.Impostor.dll

- uses: actions/upload-artifact@v3
with:
name: Reactor.Impostor.Http.dll
path: Reactor.Impostor.Http/bin/Release/net7.0/Reactor.Impostor.Http.dll
path: Reactor.Impostor/bin/Release/net8.0/Reactor.Impostor.dll

- uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
draft: true
files: |
Reactor.Impostor/bin/Release/net7.0/Reactor.Impostor.dll
Reactor.Impostor.Http/bin/Release/net7.0/Reactor.Impostor.Http.dll
Reactor.Impostor/bin/Release/net8.0/Reactor.Impostor.dll
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
12 changes: 0 additions & 12 deletions Reactor.Impostor.Http/Reactor.Impostor.Http.csproj

This file was deleted.

13 changes: 0 additions & 13 deletions Reactor.Impostor.Http/ReactorHttpPlugin.cs

This file was deleted.

31 changes: 0 additions & 31 deletions Reactor.Impostor.Http/ReactorHttpPluginStartup.cs

This file was deleted.

8 changes: 1 addition & 7 deletions Reactor.Impostor.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 12.00
#
#
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Impostor", "Reactor.Impostor\Reactor.Impostor.csproj", "{1522BD93-2A54-4B2C-8137-179978CD8D98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Impostor.Example", "Reactor.Impostor.Example\Reactor.Impostor.Example.csproj", "{9CA8D857-B2B8-4A82-9622-9E87281EC6E3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactor.Impostor.Http", "Reactor.Impostor.Http\Reactor.Impostor.Http.csproj", "{73A555DA-C1E2-4458-89D1-4CF4FEF06F59}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,9 +19,5 @@ Global
{9CA8D857-B2B8-4A82-9622-9E87281EC6E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CA8D857-B2B8-4A82-9622-9E87281EC6E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CA8D857-B2B8-4A82-9622-9E87281EC6E3}.Release|Any CPU.Build.0 = Release|Any CPU
{73A555DA-C1E2-4458-89D1-4CF4FEF06F59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73A555DA-C1E2-4458-89D1-4CF4FEF06F59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73A555DA-C1E2-4458-89D1-4CF4FEF06F59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73A555DA-C1E2-4458-89D1-4CF4FEF06F59}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Impostor.Api.Games;
using Impostor.Http;
using Impostor.Api.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;

Expand Down
2 changes: 1 addition & 1 deletion Reactor.Impostor/Reactor.Impostor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Impostor.Api" Version="1.8.0" />
<PackageReference Include="Impostor.Api" Version="1.9.0" />
<PackageReference Include="Reactor.Networking.Shared" Version="2.0.0" PrivateAssets="all" />
</ItemGroup>

Expand Down
15 changes: 13 additions & 2 deletions Reactor.Impostor/ReactorPluginStartup.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
using Impostor.Api.Events;
using Impostor.Api.Http;
using Impostor.Api.Plugins;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Reactor.Impostor.Http;
using Reactor.Impostor.Rpcs;

namespace Reactor.Impostor;

public class ReactorPluginStartup : IPluginStartup
public class ReactorPluginStartup : IPluginHttpStartup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IEventListener, HandshakeEventListener>();
services.AddSingleton<IReactorCustomRpcManager, ReactorCustomRpcManager>();

services.AddSingleton<IListingFilter, ReactorHandshakeFilter>();
services.AddSingleton<ClientModsHeader>();
}

public void ConfigureWebApplication(IApplicationBuilder builder)
{
builder.UseMiddleware<ClientModsHeader>();
}

public void ConfigureHost(IHostBuilder host)
{
}
}
}
Loading