diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 44b473e..98ca7e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,15 +26,9 @@ jobs: 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 - - 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 diff --git a/Reactor.Impostor.Http/Reactor.Impostor.Http.csproj b/Reactor.Impostor.Http/Reactor.Impostor.Http.csproj deleted file mode 100644 index 734155e..0000000 --- a/Reactor.Impostor.Http/Reactor.Impostor.Http.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Makse sure people joining an Impostor room have compatible mods - true - - - - - - - diff --git a/Reactor.Impostor.Http/ReactorHttpPlugin.cs b/Reactor.Impostor.Http/ReactorHttpPlugin.cs deleted file mode 100644 index 1061013..0000000 --- a/Reactor.Impostor.Http/ReactorHttpPlugin.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Impostor.Api.Plugins; - -namespace Reactor.Impostor.Http; - -/// -/// Plugin that checks the Reactor HTTP handshake for Impostor.Http. -/// -[ImpostorPlugin("gg.reactor.impostor.http")] -[ImpostorDependency("gg.impostor.http", DependencyType.HardDependency)] -[ImpostorDependency("gg.reactor.impostor", DependencyType.HardDependency)] -public class ReactorHttpPlugin : PluginBase -{ -} diff --git a/Reactor.Impostor.Http/ReactorHttpPluginStartup.cs b/Reactor.Impostor.Http/ReactorHttpPluginStartup.cs deleted file mode 100644 index bec7f57..0000000 --- a/Reactor.Impostor.Http/ReactorHttpPluginStartup.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Impostor.Api.Plugins; -using Impostor.Http; -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace Reactor.Impostor.Http; - -/// -/// Register the ReactorHandshakeFilter. -/// -public class ReactorHttpPluginStartup : IPluginStartup -{ - /// - public void ConfigureHost(IHostBuilder host) - { - // Not used - } - - /// - public void ConfigureServices(IServiceCollection services) - { - services.AddSingleton(); - services.AddSingleton(); - - ImpostorHttpPluginStartup.OnWebHostConfigure += (app) => - { - app.UseMiddleware(); - }; - } -} diff --git a/Reactor.Impostor.sln b/Reactor.Impostor.sln index 284ecd8..5f7e936 100644 --- a/Reactor.Impostor.sln +++ b/Reactor.Impostor.sln @@ -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 @@ -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 diff --git a/Reactor.Impostor.Http/ClientModsHeader.cs b/Reactor.Impostor/Http/ClientModsHeader.cs similarity index 100% rename from Reactor.Impostor.Http/ClientModsHeader.cs rename to Reactor.Impostor/Http/ClientModsHeader.cs diff --git a/Reactor.Impostor.Http/ReactorHandshakeFilter.cs b/Reactor.Impostor/Http/ReactorHandshakeFilter.cs similarity index 98% rename from Reactor.Impostor.Http/ReactorHandshakeFilter.cs rename to Reactor.Impostor/Http/ReactorHandshakeFilter.cs index 4d9ffcf..5547668 100644 --- a/Reactor.Impostor.Http/ReactorHandshakeFilter.cs +++ b/Reactor.Impostor/Http/ReactorHandshakeFilter.cs @@ -1,5 +1,5 @@ using Impostor.Api.Games; -using Impostor.Http; +using Impostor.Api.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; diff --git a/Reactor.Impostor/Reactor.Impostor.csproj b/Reactor.Impostor/Reactor.Impostor.csproj index 5bc0673..9ea1879 100644 --- a/Reactor.Impostor/Reactor.Impostor.csproj +++ b/Reactor.Impostor/Reactor.Impostor.csproj @@ -5,7 +5,7 @@ - + diff --git a/Reactor.Impostor/ReactorPluginStartup.cs b/Reactor.Impostor/ReactorPluginStartup.cs index 60b2282..f24504c 100644 --- a/Reactor.Impostor/ReactorPluginStartup.cs +++ b/Reactor.Impostor/ReactorPluginStartup.cs @@ -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(); services.AddSingleton(); + + services.AddSingleton(); + services.AddSingleton(); + } + + public void ConfigureWebApplication(IApplicationBuilder builder) + { + builder.UseMiddleware(); } public void ConfigureHost(IHostBuilder host) { } -} \ No newline at end of file +}