diff options
author | Dennis Kobert <d-kobert@web.de> | 2019-06-11 23:38:13 +0200 |
---|---|---|
committer | Dennis Kobert <d-kobert@web.de> | 2019-06-11 23:38:13 +0200 |
commit | 2fa4a0e50ebfc97059c8b84dbd17e79f9afc8a8d (patch) | |
tree | c3b34ccb2737e347a73768536895cbbaab13cc01 /DSACore/DSA_Game/Dsa.cs | |
parent | ec991104f56e90d7bb2878da2fe6ed4e585dfc46 (diff) | |
parent | af74efccf8d21e6151022b71f3cacd3fa83024ee (diff) |
Merge branch 'rework-backend'
Diffstat (limited to 'DSACore/DSA_Game/Dsa.cs')
-rw-r--r-- | DSACore/DSA_Game/Dsa.cs | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/DSACore/DSA_Game/Dsa.cs b/DSACore/DSA_Game/Dsa.cs deleted file mode 100644 index 3b2e4aa..0000000 --- a/DSACore/DSA_Game/Dsa.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using DSACore.Auxiliary; -using DSACore.FireBase; -using DSALib; -using DSALib.Characters; -using Microsoft.EntityFrameworkCore.Design; - -namespace DSACore.DSA_Game -{ - using System.Collections.Generic; - using System.IO; - using System.Linq; - using DSACore.DSA_Game.Characters; - using DSACore.DSA_Game.Save; - - public static class Dsa - { -#if DEBUG - public const string rootPath = "C:\\Users\\Dennis\\Source\\Repos\\DiscoBot\\DSACore\\";//"DiscoBot\\DSACore\\"; -#else - public const string rootPath = "";//"DiscoBot\\DSACore\\"; -#endif - private static Session s_session; - - public static List<ICharacter> Chars { get; set; } = new List<ICharacter>(); // list of all characters - - public static List<Talent> Talente { get; set; } = new List<Talent>(); - - public static List<Zauber> Zauber { get; set; } = new List<Zauber>(); - - public static Session Session - { - get - { - s_session.Chars = Chars.Select(x => SaveChar.FromICharacter(x)).ToList(); - return s_session; - } - - set - { - s_session = value; - foreach (var x in value.Chars) - { - Chars.Find(c => c.Name.Equals(x.Name)).Update(x); - } - } - } - - public static void Startup() - { - //new .Auxiliary.Calculator.StringSolver("1d100 - (1d200 + 1) * -50000").Solve(); - /*Session = new Session();*/ - // relation.Add("Papo", "Pump aus der Gosse"); - /*foreach (var filename in Directory.GetFiles(rootPath + "helden", "*.xml")) - { - Chars.Add(new Character(filename)); - (Chars.Last() as Character)?.Talente.Select(x => new Talent(x.Name, x.Probe, 0)) - .Where(c => !Talente.Exists(v => v.Name.Equals(c.Name))).ToList().ForEach(v => Talente.Add(v)); - (Chars.Last() as Character)?.Zauber.Select(x => new Zauber(x.Name, x.Probe, 0, x.Complexity)) - .Where(c => !Zauber.Exists(v => v.Name.Equals(c.Name))).ToList().ForEach(v => Zauber.Add(v)); - } -*/ - - Properties.Deserialize(rootPath+"Properties"); - Properties.Serialize(rootPath + "Properties"); - - - Talente = Talente.OrderBy(x => x.Name).ToList(); - Zauber = Zauber.OrderBy(x => x.Name).ToList(); - - /*foreach (var talent in Talente) - { - Database.AddTalent(new Models.Database.Talent(talent.Name, talent.Probe)); - } - - foreach (var talent in Zauber) - { - Database.AddSpell(new Models.Database.GeneralSpell(talent.Name, talent.Probe, talent.Complexity)); - }*/ - - //new WeaponImporter().DownloadWeapons().Wait(); - - - Session = new Session - { - Chars = Chars.Select(SaveChar.FromICharacter).ToList() - }; - //Session.Save(); - } - - public static ICharacter GetCharacter(ulong id) - { - throw new NotImplementedException(); - } - - public static ICharacter GetCharacter(string name, ulong groupId) - { - throw new NotImplementedException(); - } - } -}
\ No newline at end of file |