Fix setup
This commit is contained in:
parent
41a433bf3f
commit
0f62e9e9c9
@ -121,7 +121,7 @@ public static class Setup
|
|||||||
"https://api.shocklink.net");
|
"https://api.shocklink.net");
|
||||||
string apiKey = QueryString("OpenShock API-Key:","");
|
string apiKey = QueryString("OpenShock API-Key:","");
|
||||||
Console.WriteLine("Shocker IDs associated with this API:");
|
Console.WriteLine("Shocker IDs associated with this API:");
|
||||||
List<string> shockerIds = GetShockerIds(c.Shockers);
|
List<string> shockerIds = AddShockerIds();
|
||||||
IntensityRange intensityRange = GetIntensityRange();
|
IntensityRange intensityRange = GetIntensityRange();
|
||||||
DurationRange durationRange = GetDurationRange();
|
DurationRange durationRange = GetDurationRange();
|
||||||
|
|
||||||
@ -186,6 +186,24 @@ public static class Setup
|
|||||||
return new DurationRange(min, max);
|
return new DurationRange(min, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static List<string> AddShockerIds()
|
||||||
|
{
|
||||||
|
List<string> 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<string> GetShockerIds(List<Shocker> shockers)
|
private static List<string> GetShockerIds(List<Shocker> shockers)
|
||||||
{
|
{
|
||||||
List<string> allShockerIds = new();
|
List<string> allShockerIds = new();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user