From 19bf37de7642ae8cdefd8fc6b4fadac3ac96ea9b Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Wed, 26 Sep 2018 23:49:26 +0200 Subject: ported most code to WebApiProject everything except the user identification and file locations should be somewhat functional --- DSACore/Commands/List.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 DSACore/Commands/List.cs (limited to 'DSACore/Commands/List.cs') diff --git a/DSACore/Commands/List.cs b/DSACore/Commands/List.cs new file mode 100644 index 0000000..1fa0dde --- /dev/null +++ b/DSACore/Commands/List.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using DSACore.DSA_Game; +using DSACore.Audio; + +namespace DSACore.Commands +{ + public class List + { + public static string ListAsync(string prop) + { + var res = new List(); + + //int persist = 0; + + switch (prop.ToLower()) + { + case "man": + case "help": + return Help.Get_Specific_Help("List"); + // break; + case "chars": + res.AddRange(Dsa.Chars.Select(x => x.Name)); + break; + case "commands": + // res.AddRange(Help.Commands.Select(x => x.Name)); + res.Add(Help.Get_Generic_Help()); + break; + case "play": + case "sound": + case "sounds": + res.AddRange( + Enum.GetNames(typeof(Sound))); + break; + + default: + res.Add($"Kommando {prop} nicht gefunden"); + break; + } + + + return res.ToString(); + } + } +} -- cgit v1.2.3-54-g00ecf