Update Dependency Cshocker

Update Dependency CS2GSI
Update README
OpenShock now automatically gets shockerIds
This commit is contained in:
2024-01-19 02:06:26 +01:00
parent d040995051
commit 18d3b6bf66
5 changed files with 35 additions and 17 deletions

View File

@ -2,7 +2,7 @@
using CS2GSI;
using CShocker.Ranges;
using CShocker.Shockers.Abstract;
using CS2Event = CS2GSI.CS2GSI.CS2Event;
using CS2Event = CS2GSI.CS2Event;
namespace OpenCS2hock;

View File

@ -10,8 +10,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CS2GSI" Version="1.0.6" />
<PackageReference Include="CShocker" Version="1.2.0" />
<PackageReference Include="CS2GSI" Version="1.0.7" />
<PackageReference Include="CShocker" Version="1.2.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

View File

@ -4,7 +4,7 @@ using CShocker.Shockers;
using CShocker.Shockers.Abstract;
using CShocker.Shockers.APIS;
using Microsoft.Extensions.Logging;
using CS2Event = CS2GSI.CS2GSI.CS2Event;
using CS2Event = CS2GSI.CS2Event;
namespace OpenCS2hock;
@ -117,18 +117,16 @@ public static class Setup
Shocker newShocker;
DurationRange durationRange;
IntensityRange intensityRange;
List<string> shockerIds;
List<string> shockerIds = new();
switch (selected)
{
case 1: //OpenShock (HTTP)
apiUri = QueryString("OpenShock API-Endpoint (https://api.shocklink.net):", "https://api.shocklink.net");
apiKey = QueryString("OpenShock API-Key:","");
Console.WriteLine("Shocker IDs associated with this API:");
shockerIds = AddShockerIds();
intensityRange = GetIntensityRange();
durationRange = GetDurationRange();
newShocker = new OpenShockHttp(shockerIds, intensityRange, durationRange, apiUri, apiKey);
newShocker.ShockerIds.AddRange(((OpenShockHttp)newShocker).GetShockers());
break;
case 3: //PiShock (HTTP)
apiUri = QueryString("PiShock API-Endpoint (https://do.pishock.com/api/apioperate):", "https://do.pishock.com/api/apioperate");

View File

@ -1,5 +1,5 @@
using CShocker.Shockers;
using CS2Event = CS2GSI.CS2GSI.CS2Event;
using CS2GSI;
using CShocker.Shockers;
namespace OpenCS2hock;