Skip to content

Commit

Permalink
Fix export of ShockerActions to Json
Browse files Browse the repository at this point in the history
Update Dependencies
  • Loading branch information
C9Glax committed Nov 3, 2024
1 parent 2d429fc commit ffb8592
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions OpenCS2hock.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CGlax_005CRiderProjects_005CCShocker_005CCShocker_005Cbin_005CDebug_005Cnet7_002E0_005CCShocker_002Edll/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CGlax_005CRiderProjects_005CCShocker_005CCShocker_005Cbin_005CRelease_005Cnet7_002E0_005Cpublish_005CCShocker_002Edll/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
&lt;Assembly Path="C:\Users\Glax\RiderProjects\CShocker\CShocker\bin\Debug\net7.0\CShocker.dll" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String>
Expand Down
6 changes: 3 additions & 3 deletions OpenCS2hock/OpenCS2hock.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CS2GSI" Version="1.0.7" />
<PackageReference Include="CShocker" Version="2.4.0" />
<PackageReference Include="GlaxLogger" Version="1.0.6" />
<PackageReference Include="CS2GSI" Version="1.0.8" />
<PackageReference Include="CShocker" Version="2.5.1" />
<PackageReference Include="GlaxLogger" Version="1.0.7.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions OpenCS2hock/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private static void AddShockerApi(ref Configuration c)
switch (selected)
{
case 1: //OpenShock (HTTP)
apiUri = QueryString("OpenShock API-Endpoint (https://api.shocklink.net):", "https://api.shocklink.net");
apiUri = QueryString($"OpenShock API-Endpoint ({OpenShockApi.DefaultEndpoint}):", OpenShockApi.DefaultEndpoint);
apiKey = QueryString("OpenShock API-Key:","");
api = new OpenShockHttp(apiKey, apiUri);
foreach(OpenShockShocker shocker in ((OpenShockHttp)api).GetShockers())
Expand All @@ -134,7 +134,7 @@ private static void AddShockerApi(ref Configuration c)
case 2: //OpenShock (Serial)
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
throw new PlatformNotSupportedException("Serial is only supported on Windows.");
apiUri = QueryString("OpenShock API-Endpoint (https://api.shocklink.net):", "https://api.shocklink.net");
apiUri = QueryString($"OpenShock API-Endpoint ({OpenShockApi.DefaultEndpoint}):", OpenShockApi.DefaultEndpoint);
apiKey = QueryString("OpenShock API-Key:","");
SerialPortInfo serialPort = SelectSerialPort();
api = new OpenShockSerial(serialPort, apiKey, apiUri);
Expand Down
8 changes: 4 additions & 4 deletions OpenCS2hock/ShockerAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ public struct ShockerAction
{
public CS2Event TriggerEvent;
// ReSharper disable MemberCanBePrivate.Global -> exposed
public readonly int ShockerId;
public readonly ControlAction Action;
public readonly bool ValueFromInput;
public readonly IntegerRange IntensityRange, DurationRange;
public int ShockerId;
public ControlAction Action;
public bool ValueFromInput;
public IntegerRange IntensityRange, DurationRange;

public ShockerAction(CS2Event trigger, int shockerId, ControlAction action, bool valueFromInput, IntegerRange intensityRange, IntegerRange durationRange)
{
Expand Down

0 comments on commit ffb8592

Please sign in to comment.