diff options
Diffstat (limited to 'DSACore/DSA_Game')
-rw-r--r-- | DSACore/DSA_Game/Characters/Character.cs | 14 | ||||
-rw-r--r-- | DSACore/DSA_Game/Characters/NPC.cs | 4 | ||||
-rw-r--r-- | DSACore/DSA_Game/Dsa.cs | 15 | ||||
-rw-r--r-- | DSACore/DSA_Game/Save/Properties.cs | 9 | ||||
-rw-r--r-- | DSACore/DSA_Game/Save/SaveCommand.cs | 10 | ||||
-rw-r--r-- | DSACore/DSA_Game/Save/Session.cs | 7 |
6 files changed, 21 insertions, 38 deletions
diff --git a/DSACore/DSA_Game/Characters/Character.cs b/DSACore/DSA_Game/Characters/Character.cs index 62d2e11..ac890cb 100644 --- a/DSACore/DSA_Game/Characters/Character.cs +++ b/DSACore/DSA_Game/Characters/Character.cs @@ -1,17 +1,15 @@ -using System.IO; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Xml; using DSACore.Auxiliary; using DSALib; using DSALib.Characters; namespace DSACore.DSA_Game.Characters { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Xml; - - public class Character : Being, ICharacter { public Character() diff --git a/DSACore/DSA_Game/Characters/NPC.cs b/DSACore/DSA_Game/Characters/NPC.cs index e6b7bed..75c3fe9 100644 --- a/DSACore/DSA_Game/Characters/NPC.cs +++ b/DSACore/DSA_Game/Characters/NPC.cs @@ -4,10 +4,6 @@ using DSALib.Characters; namespace DSACore.Characters { - using System; - using Auxiliary; - using DSACore.DSA_Game.Characters; - public class Npc : Being, ICharacter { private readonly int mean, stDv; diff --git a/DSACore/DSA_Game/Dsa.cs b/DSACore/DSA_Game/Dsa.cs index f2ffe48..18d0b81 100644 --- a/DSACore/DSA_Game/Dsa.cs +++ b/DSACore/DSA_Game/Dsa.cs @@ -1,18 +1,13 @@ using System; -using DSACore.Auxiliary; -using DSACore.FireBase; +using System.Collections.Generic; +using System.Linq; +using DSACore.DSA_Game.Characters; +using DSACore.DSA_Game.Save; using DSALib; using DSALib.Characters; -using Microsoft.EntityFrameworkCore.Design; namespace DSACore.DSA_Game { - using System.Collections.Generic; - using System.IO; - using System.Linq; - using Characters; - using Save; - public static class Dsa { #if DEBUG @@ -59,7 +54,7 @@ namespace DSACore.DSA_Game } */ - Properties.Deserialize(rootPath + "Properties"); + Properties.Deserialize(); Properties.Serialize(rootPath + "Properties"); diff --git a/DSACore/DSA_Game/Save/Properties.cs b/DSACore/DSA_Game/Save/Properties.cs index 50bd8fa..7eba911 100644 --- a/DSACore/DSA_Game/Save/Properties.cs +++ b/DSACore/DSA_Game/Save/Properties.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; @@ -8,10 +9,6 @@ using Newtonsoft.Json; namespace DSACore.DSA_Game.Save { - using System.Collections; - using System.IO; - using Newtonsoft.Json; - public static class Properties { public static Dictionary<string, object> objects; @@ -64,7 +61,7 @@ namespace DSACore.DSA_Game.Save foreach (var o in objects) { var assembly = o.Value is IList list - ? ((IList) list)[0]?.GetType().FullName + ? list[0]?.GetType().FullName : o.Value.GetType().FullName; var name = path + assembly.Replace('.', '-') + ".json"; @@ -76,7 +73,7 @@ namespace DSACore.DSA_Game.Save catch (Exception e) { // ignored - Console.WriteLine($"Speichern von Save-File fehlgeschlagen." + e); + Console.WriteLine("Speichern von Save-File fehlgeschlagen." + e); } } } diff --git a/DSACore/DSA_Game/Save/SaveCommand.cs b/DSACore/DSA_Game/Save/SaveCommand.cs index 80d4426..f358047 100644 --- a/DSACore/DSA_Game/Save/SaveCommand.cs +++ b/DSACore/DSA_Game/Save/SaveCommand.cs @@ -1,18 +1,16 @@ using System; +using System.IO; using System.Linq; -using System.Threading.Tasks; namespace DSACore.DSA_Game.Save { - using System.IO; - public class SaveCommand { public void LoadSession(string name = "") { if (name.Equals("?") || name.Equals(string.Empty)) { - Console.WriteLine($"Gespeicherte Sessions:"); + Console.WriteLine("Gespeicherte Sessions:"); Console.WriteLine(ListSessions()); return; } @@ -32,7 +30,7 @@ namespace DSACore.DSA_Game.Save if (name.Equals("?") || name.Equals(string.Empty)) { - Console.WriteLine($"Gespeicherte Sessions:"); + Console.WriteLine("Gespeicherte Sessions:"); Console.WriteLine(ListSessions()); return; } @@ -49,7 +47,7 @@ namespace DSACore.DSA_Game.Save { Directory.CreateDirectory(path); Dsa.Session.SessionName = name; - Dsa.Session.Save(path + "\\" + name + $"-0.json"); + Dsa.Session.Save(path + "\\" + name + "-0.json"); } Console.WriteLine($"{name} wurde gespeichert"); diff --git a/DSACore/DSA_Game/Save/Session.cs b/DSACore/DSA_Game/Save/Session.cs index 595f0e8..6944fb1 100644 --- a/DSACore/DSA_Game/Save/Session.cs +++ b/DSACore/DSA_Game/Save/Session.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Generic; +using System.IO; +using DSACore.DSA_Game.Characters; +using Newtonsoft.Json; namespace DSACore.DSA_Game.Save { - using System.IO; - using Characters; - using Newtonsoft.Json; - public class Session { public static string DirectoryPath { get; set; } = Dsa.rootPath + @"sessions"; |