From d574650f70daa0cee15220eea305ca7eb594a746 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 5 May 2019 23:14:17 +0200 Subject: Revert "fixed Properties load path" This reverts commit 6543b93a67a14ffa6f184e28b67912df7e314315. --- DSACore/DSA_Game/Dsa.cs | 6 +++--- DSACore/DSA_Game/Save/Properties.cs | 2 +- DSACore/Startup.cs | 8 ++------ DiscoBot/DiscoBot.csproj | 25 ++++++++++--------------- DiscoBot/Program.cs | 2 +- DiscoBot/packages.config | 12 ++++++------ 6 files changed, 23 insertions(+), 32 deletions(-) diff --git a/DSACore/DSA_Game/Dsa.cs b/DSACore/DSA_Game/Dsa.cs index dda55c2..3b2e4aa 100644 --- a/DSACore/DSA_Game/Dsa.cs +++ b/DSACore/DSA_Game/Dsa.cs @@ -16,7 +16,7 @@ namespace DSACore.DSA_Game public static class Dsa { #if DEBUG - public const string rootPath = "";//"C:\\Users\\Dennis\\Source\\Repos\\DiscoBot\\DSACore\\";//"DiscoBot\\DSACore\\"; + public const string rootPath = "C:\\Users\\Dennis\\Source\\Repos\\DiscoBot\\DSACore\\";//"DiscoBot\\DSACore\\"; #else public const string rootPath = "";//"DiscoBot\\DSACore\\"; #endif @@ -61,8 +61,8 @@ namespace DSACore.DSA_Game } */ - Properties.Deserialize($"{rootPath}Properties"); - Properties.Serialize($"{rootPath}Properties"); + Properties.Deserialize(rootPath+"Properties"); + Properties.Serialize(rootPath + "Properties"); Talente = Talente.OrderBy(x => x.Name).ToList(); diff --git a/DSACore/DSA_Game/Save/Properties.cs b/DSACore/DSA_Game/Save/Properties.cs index b0e07e2..459a9c7 100644 --- a/DSACore/DSA_Game/Save/Properties.cs +++ b/DSACore/DSA_Game/Save/Properties.cs @@ -43,7 +43,7 @@ namespace DSACore.DSA_Game.Save { try { - string name = file.Split('\\').Last().Split('/').Last().Split('.')[0].Replace('-', '.'); + string name = file.Split('\\').Last().Split('.')[0].Replace('-', '.'); string data = File.ReadAllText(file); Type type = Type.GetType(name); if (data.StartsWith("[")) diff --git a/DSACore/Startup.cs b/DSACore/Startup.cs index ae86824..f8f6dfd 100644 --- a/DSACore/Startup.cs +++ b/DSACore/Startup.cs @@ -45,11 +45,7 @@ namespace DSACore */ services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); - services.AddSignalR(hubOptions => - { - hubOptions.EnableDetailedErrors = true; - hubOptions.KeepAliveInterval = TimeSpan.FromMinutes(1); - }); + services.AddSignalR(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -64,7 +60,7 @@ namespace DSACore app.UseHsts(); } - //app.UseCors("CorsPolicy"); + app.UseCors("CorsPolicy"); app.UseSignalR(routes => { routes.MapHub("/chatHub"); }); diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj index 7da96db..d25a5e9 100644 --- a/DiscoBot/DiscoBot.csproj +++ b/DiscoBot/DiscoBot.csproj @@ -35,28 +35,23 @@ 4 - - ..\packages\Discord.Net.Commands.2.0.1\lib\net46\Discord.Net.Commands.dll - True + + ..\packages\Discord.Net.Commands.2.0.0-beta\lib\netstandard1.1\Discord.Net.Commands.dll - - ..\packages\Discord.Net.Core.2.0.1\lib\net46\Discord.Net.Core.dll - True + + ..\packages\Discord.Net.Core.2.0.0-beta\lib\net45\Discord.Net.Core.dll - - ..\packages\Discord.Net.Rest.2.0.1\lib\net46\Discord.Net.Rest.dll - True + + ..\packages\Discord.Net.Rest.2.0.0-beta\lib\net45\Discord.Net.Rest.dll ..\packages\Discord.Net.Rpc.1.0.2\lib\net45\Discord.Net.Rpc.dll - - ..\packages\Discord.Net.Webhook.2.0.1\lib\netstandard1.3\Discord.Net.Webhook.dll - True + + ..\packages\Discord.Net.Webhook.2.0.0-beta\lib\netstandard1.1\Discord.Net.Webhook.dll - - ..\packages\Discord.Net.WebSocket.2.0.1\lib\net46\Discord.Net.WebSocket.dll - True + + ..\packages\Discord.Net.WebSocket.2.0.0-beta\lib\net45\Discord.Net.WebSocket.dll ..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll diff --git a/DiscoBot/Program.cs b/DiscoBot/Program.cs index 9675b48..5dc69c1 100644 --- a/DiscoBot/Program.cs +++ b/DiscoBot/Program.cs @@ -53,7 +53,7 @@ namespace DiscoBot this.client.MessageReceived += this.HandleCommandAsync; // Discover all of the commands in this assembly and load them. - return this.commands.AddModulesAsync(Assembly.GetEntryAssembly(), services); + return this.commands.AddModulesAsync(Assembly.GetEntryAssembly()); } public async Task HandleCommandAsync(SocketMessage messageParam) diff --git a/DiscoBot/packages.config b/DiscoBot/packages.config index b1d02d9..4aa29aa 100644 --- a/DiscoBot/packages.config +++ b/DiscoBot/packages.config @@ -1,12 +1,12 @@  - - - - + + + + - - + + -- cgit v1.3.1