summaryrefslogtreecommitdiff
path: root/DSACore
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-05-05 23:14:17 +0200
committerDennis Kobert <d-kobert@web.de>2019-05-05 23:14:17 +0200
commitd574650f70daa0cee15220eea305ca7eb594a746 (patch)
tree7cc46e53c0317d9e83c46d551e0543e339f6bb1f /DSACore
parentf563fc69cb15047051982f2e7c0364b98ee9d2da (diff)
Revert "fixed Properties load path"
This reverts commit 6543b93a67a14ffa6f184e28b67912df7e314315.
Diffstat (limited to 'DSACore')
-rw-r--r--DSACore/DSA_Game/Dsa.cs6
-rw-r--r--DSACore/DSA_Game/Save/Properties.cs2
-rw-r--r--DSACore/Startup.cs8
3 files changed, 6 insertions, 10 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>("/chatHub"); });