Compare commits
3 Commits
ee0ca69475
...
3.1
Author | SHA1 | Date | |
---|---|---|---|
92cc79f707 | |||
6778375f43 | |||
0dcee037fc |
@ -11,7 +11,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CS2GSI" Version="1.0.7" />
|
||||
<PackageReference Include="CShocker" Version="1.2.2" />
|
||||
<PackageReference Include="CShocker" Version="1.2.5" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -218,23 +218,26 @@ public static class Setup
|
||||
|
||||
private static List<string> GetShockerIds(List<Shocker> shockers)
|
||||
{
|
||||
List<string> allShockerIds = new();
|
||||
foreach(Shocker shocker in shockers)
|
||||
allShockerIds.AddRange(shocker.ShockerIds);
|
||||
|
||||
List<string> ids = new();
|
||||
bool addAnother = true;
|
||||
while (ids.Count < 1 || addAnother)
|
||||
{
|
||||
Console.WriteLine("Select Shocker API:");
|
||||
for(int i = 0; i < shockers.Count; i++)
|
||||
Console.WriteLine($"{i}) {shockers[i]}");
|
||||
|
||||
for (int i = 0; i < allShockerIds.Count; i++)
|
||||
Console.WriteLine($"{i}) {allShockerIds[i]}");
|
||||
int selectedShocker;
|
||||
while (!int.TryParse(Console.ReadLine(), out selectedShocker) || selectedShocker < 0 || selectedShocker >= shockers.Count)
|
||||
Console.WriteLine("Select Shocker API:");
|
||||
|
||||
for (int i = 0; i < shockers[selectedShocker].ShockerIds.Count; i++)
|
||||
Console.WriteLine($"{i}) {shockers[selectedShocker].ShockerIds[i]}");
|
||||
|
||||
int selectedIndex;
|
||||
while (!int.TryParse(Console.ReadLine(), out selectedIndex) || selectedIndex < 0 || selectedIndex >= allShockerIds.Count)
|
||||
while (!int.TryParse(Console.ReadLine(), out selectedIndex) || selectedIndex < 0 || selectedIndex >= shockers[selectedShocker].ShockerIds.Count)
|
||||
Console.WriteLine("Select ID:");
|
||||
|
||||
ids.Add(allShockerIds[selectedIndex]);
|
||||
ids.Add(shockers[selectedShocker].ShockerIds[selectedIndex]);
|
||||
|
||||
Console.WriteLine("Add another ID? (Y/N):");
|
||||
addAnother = Console.ReadKey().Key == ConsoleKey.Y;
|
||||
|
@ -49,8 +49,8 @@ Example `config.json`. Place next to executable. Will also be generated on first
|
||||
## Shockers
|
||||
|
||||
### ApiKey
|
||||
For OpenShock (HTTP) get token [here](https://shocklink.net/#/dashboard/tokens)
|
||||
For PiShock (HTTP) get information [here](https://apidocs.pishock.com/#header-authenticating)
|
||||
- For OpenShock (HTTP) get token [here](https://shocklink.net/#/dashboard/tokens)
|
||||
- For PiShock (HTTP) get information [here](https://apidocs.pishock.com/#header-authenticating)
|
||||
|
||||
### ApiType
|
||||
CShocker [](https://github.com/C9Glax/cshocker) [here](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/Abstract/ShockerApi.cs)
|
||||
|
Reference in New Issue
Block a user