diff --git a/OpenCS2hock/Setup.cs b/OpenCS2hock/Setup.cs index 89f81ad..e312eb4 100644 --- a/OpenCS2hock/Setup.cs +++ b/OpenCS2hock/Setup.cs @@ -121,7 +121,7 @@ public static class Setup "https://api.shocklink.net"); string apiKey = QueryString("OpenShock API-Key:",""); Console.WriteLine("Shocker IDs associated with this API:"); - List shockerIds = GetShockerIds(c.Shockers); + List shockerIds = AddShockerIds(); IntensityRange intensityRange = GetIntensityRange(); DurationRange durationRange = GetDurationRange(); @@ -186,6 +186,24 @@ public static class Setup return new DurationRange(min, max); } + private static List AddShockerIds() + { + List ids = new(); + bool addAnother = true; + while (ids.Count < 1 || addAnother) + { + string id = QueryString("Shocker ID:", ""); + while (id.Length < 1) + id = QueryString("Shocker ID:", ""); + + ids.Add(id); + + Console.WriteLine("Add another ID? (Y/N):"); + addAnother = Console.ReadKey().Key == ConsoleKey.Y; + } + return ids; + } + private static List GetShockerIds(List shockers) { List allShockerIds = new();