Update Dependency Cshocker
Update Dependency CS2GSI Update README OpenShock now automatically gets shockerIds
This commit is contained in:
parent
d040995051
commit
18d3b6bf66
@ -2,7 +2,7 @@
|
|||||||
using CS2GSI;
|
using CS2GSI;
|
||||||
using CShocker.Ranges;
|
using CShocker.Ranges;
|
||||||
using CShocker.Shockers.Abstract;
|
using CShocker.Shockers.Abstract;
|
||||||
using CS2Event = CS2GSI.CS2GSI.CS2Event;
|
using CS2Event = CS2GSI.CS2Event;
|
||||||
|
|
||||||
namespace OpenCS2hock;
|
namespace OpenCS2hock;
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CS2GSI" Version="1.0.6" />
|
<PackageReference Include="CS2GSI" Version="1.0.7" />
|
||||||
<PackageReference Include="CShocker" Version="1.2.0" />
|
<PackageReference Include="CShocker" Version="1.2.2" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ using CShocker.Shockers;
|
|||||||
using CShocker.Shockers.Abstract;
|
using CShocker.Shockers.Abstract;
|
||||||
using CShocker.Shockers.APIS;
|
using CShocker.Shockers.APIS;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using CS2Event = CS2GSI.CS2GSI.CS2Event;
|
using CS2Event = CS2GSI.CS2Event;
|
||||||
|
|
||||||
namespace OpenCS2hock;
|
namespace OpenCS2hock;
|
||||||
|
|
||||||
@ -117,18 +117,16 @@ public static class Setup
|
|||||||
Shocker newShocker;
|
Shocker newShocker;
|
||||||
DurationRange durationRange;
|
DurationRange durationRange;
|
||||||
IntensityRange intensityRange;
|
IntensityRange intensityRange;
|
||||||
List<string> shockerIds;
|
List<string> shockerIds = new();
|
||||||
switch (selected)
|
switch (selected)
|
||||||
{
|
{
|
||||||
case 1: //OpenShock (HTTP)
|
case 1: //OpenShock (HTTP)
|
||||||
apiUri = QueryString("OpenShock API-Endpoint (https://api.shocklink.net):", "https://api.shocklink.net");
|
apiUri = QueryString("OpenShock API-Endpoint (https://api.shocklink.net):", "https://api.shocklink.net");
|
||||||
apiKey = QueryString("OpenShock API-Key:","");
|
apiKey = QueryString("OpenShock API-Key:","");
|
||||||
Console.WriteLine("Shocker IDs associated with this API:");
|
|
||||||
shockerIds = AddShockerIds();
|
|
||||||
intensityRange = GetIntensityRange();
|
intensityRange = GetIntensityRange();
|
||||||
durationRange = GetDurationRange();
|
durationRange = GetDurationRange();
|
||||||
|
|
||||||
newShocker = new OpenShockHttp(shockerIds, intensityRange, durationRange, apiUri, apiKey);
|
newShocker = new OpenShockHttp(shockerIds, intensityRange, durationRange, apiUri, apiKey);
|
||||||
|
newShocker.ShockerIds.AddRange(((OpenShockHttp)newShocker).GetShockers());
|
||||||
break;
|
break;
|
||||||
case 3: //PiShock (HTTP)
|
case 3: //PiShock (HTTP)
|
||||||
apiUri = QueryString("PiShock API-Endpoint (https://do.pishock.com/api/apioperate):", "https://do.pishock.com/api/apioperate");
|
apiUri = QueryString("PiShock API-Endpoint (https://do.pishock.com/api/apioperate):", "https://do.pishock.com/api/apioperate");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
using CShocker.Shockers;
|
using CS2GSI;
|
||||||
using CS2Event = CS2GSI.CS2GSI.CS2Event;
|
using CShocker.Shockers;
|
||||||
|
|
||||||
namespace OpenCS2hock;
|
namespace OpenCS2hock;
|
||||||
|
|
||||||
|
34
README.md
34
README.md
@ -43,38 +43,58 @@ Example `config.json`. Place next to executable. Will also be generated on first
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### LogLevel
|
## LogLevel
|
||||||
[Levels](https://learn.microsoft.com/de-de/dotnet/api/microsoft.extensions.logging.loglevel?view=dotnet-plat-ext-8.0)
|
[Levels](https://learn.microsoft.com/de-de/dotnet/api/microsoft.extensions.logging.loglevel?view=dotnet-plat-ext-8.0)
|
||||||
|
|
||||||
|
## Shockers
|
||||||
|
|
||||||
### ApiKey
|
### ApiKey
|
||||||
For OpenShock (HTTP) get token [here](https://shocklink.net/#/dashboard/tokens)
|
For OpenShock (HTTP) get token [here](https://shocklink.net/#/dashboard/tokens)
|
||||||
|
For PiShock (HTTP) get information [here](https://apidocs.pishock.com/#header-authenticating)
|
||||||
|
|
||||||
### ApiType
|
### ApiType
|
||||||
CShocker [](https://github.com/C9Glax/cshocker) [here](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/Abstract/ShockerApi.cs)
|
CShocker [](https://github.com/C9Glax/cshocker) [here](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/Abstract/ShockerApi.cs)
|
||||||
|
|
||||||
### ShockerIds
|
### ShockerIds
|
||||||
List of Shocker-Ids, comma seperated. Get ID of shocker [here](https://shocklink.net/#/dashboard/shockers/own). Press the three dots -> Edit
|
List of Shocker-Ids, comma seperated.
|
||||||
|
|
||||||
Example `[ "ID-1", "ID-2" ]`
|
`[ "ID-1-asdasd", "ID-2-fghfgh" ]`
|
||||||
|
|
||||||
### Intensity Range
|
### Intensity Range
|
||||||
`0-100`%
|
in percent
|
||||||
|
|
||||||
|
`0-100`
|
||||||
|
|
||||||
### Duration Range
|
### Duration Range
|
||||||
in ms
|
in ms
|
||||||
|
- `0-30000` OpenShock
|
||||||
|
- `0-15000` PiShock
|
||||||
|
|
||||||
|
### Username (PiShockHttp only)
|
||||||
|
For PiShock (HTTP) get information [here](https://apidocs.pishock.com/#header-authenticating)
|
||||||
|
|
||||||
|
### Sharecode (PiShockHttp only)
|
||||||
|
For PiShock (HTTP) get information [here](https://apidocs.pishock.com/#header-authenticating)
|
||||||
|
|
||||||
|
## ShockerActions
|
||||||
|
|
||||||
### TriggerEvent IDs
|
### TriggerEvent IDs
|
||||||
From CS2GSI [](https://github.com/C9Glax/CS2GSI) [here](https://github.com/C9Glax/CS2GSI/blob/master/CS2GSI/CS2Event.cs)
|
From CS2GSI [](https://github.com/C9Glax/CS2GSI) [here](https://github.com/C9Glax/CS2GSI/blob/master/CS2GSI/CS2Event.cs)
|
||||||
|
|
||||||
### Values for `Actions`
|
### ShockerIds
|
||||||
|
List of Shocker-Ids, comma seperated. (Same as in configured Shocker)
|
||||||
|
|
||||||
|
`[ "ID-1", "ID-2" ]`
|
||||||
|
|
||||||
|
### Actions
|
||||||
From CShocker [](https://github.com/C9Glax/cshocker) [here](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/ControlAction.cs)
|
From CShocker [](https://github.com/C9Glax/cshocker) [here](https://github.com/C9Glax/CShocker/blob/master/CShocker/Shockers/ControlAction.cs)
|
||||||
|
|
||||||
### ValueFromInput
|
### ValueFromInput
|
||||||
Use CS2GSI EventArgs value to determine Intensity (within configured Range)
|
Use CS2GSI EventArgs value to determine Intensity (within configured IntensityRange)
|
||||||
|
|
||||||
# Using
|
# Using
|
||||||
### CS2GSI
|
### CS2GSI
|
||||||
[](/LICENSE)
|
[](https://img.shields.io/github/license/c9glax/CS2GSI/LICENSE)
|
||||||
[](https://www.nuget.org/packages/CS2GSI/)
|
[](https://www.nuget.org/packages/CS2GSI/)
|
||||||
[](https://github.com/C9Glax/CS2GSI)
|
[](https://github.com/C9Glax/CS2GSI)
|
||||||
[](https://github.com/C9Glax/CS2GSI/releases/latest)
|
[](https://github.com/C9Glax/CS2GSI/releases/latest)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user