diff options
author | TrueDoctor <d-kobert@web.de> | 2018-04-09 00:54:19 +0200 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-04-09 00:54:19 +0200 |
commit | 82f07c959dc7a87251b4617e462003471e3cc071 (patch) | |
tree | 37c397e9d7ae74c74b2afad3dae940237327b755 /DiscoBot/DSA.cs | |
parent | cac1ade8763605c3cf09859a48358cab0e00027a (diff) |
Refactoring and Cleanup
Diffstat (limited to 'DiscoBot/DSA.cs')
-rw-r--r-- | DiscoBot/DSA.cs | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/DiscoBot/DSA.cs b/DiscoBot/DSA.cs index af02023..d9cefb2 100644 --- a/DiscoBot/DSA.cs +++ b/DiscoBot/DSA.cs @@ -3,37 +3,43 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using System.Threading.Tasks; + + using DiscoBot.Auxiliary; + using DiscoBot.Characters; using Discord.Commands; - public static class DSA + public static class Dsa { public static ICommandContext GeneralContext { get; set; } - public static Dictionary<string, string> relation = new Dictionary<string, string>(); //dictionary to match the char - public static List<ICharacter> chars = new List<ICharacter>(); //list of all charackters - public static List<Talent> Talente { get; set; } = new List<Talent>(); + public static Dictionary<string, string> Relation { get; set; } = new Dictionary<string, string>(); // dictionary to match the char + + public static List<ICharacter> Chars { get; set; } = new List<ICharacter>(); // list of all characters - public static async Task Startup() + public static List<Talent> Talente { get; set; } = new List<Talent>(); + + public static void Startup() { - relation.Add("The Doctor", "Numeri Illuminus");//Relation - relation.Add("Tardis", "Morla");//"Numeri Illuminus"); - relation.Add("DSA Bot", "Morla");//"Felis Exodus Schattenwald"); - relation.Add("Morla", "Morla"); - relation.Add("Rhoktar", "Rhoktar4"); - //relation.Add("Papo","Gwendelson"); - relation.Add("Papo", "Pump aus der Gosse"); - relation.Add("Potus", "Potus"); - //relation.Add("Papo", "Pump aus der Gosse"); + Relation.Add("The Doctor", "Numeri Illuminus"); // Relation + Relation.Add("Tardis", "Morla"); // "Numeri Illuminus"); + Relation.Add("DSA Bot", "Morla"); // "Felis Exodus Schattenwald"); + Relation.Add("Morla", "Morla"); + Relation.Add("Rhoktar", "Rhoktar4"); + + // relation.Add("Papo","Gwendelson"); + Relation.Add("Papo", "Pump aus der Gosse"); + Relation.Add("Potus", "Potus"); + + // relation.Add("Papo", "Pump aus der Gosse"); foreach (var filename in Directory.GetFiles("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.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)); } - Talente = Talente.OrderBy(x => x.name).ToList(); + Talente = Talente.OrderBy(x => x.Name).ToList(); } } }
\ No newline at end of file |