Skip to content

Commit d0b192d

Browse files
committed
Changed Plugin Location
1 parent 0f72f5b commit d0b192d

File tree

14 files changed

+27
-17
lines changed

14 files changed

+27
-17
lines changed

GameLib.Demo/GameLib.Demo.Console/GameLib.Demo.Console.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17+
<ProjectReference Include="..\..\GameLib.Plugin\GameLib.Plugin.RiotGames\GameLib.Plugin.RiotGames.csproj" />
1718
<ProjectReference Include="..\..\GameLib\GameLib.csproj" />
1819
<ProjectReference Include="..\..\GameLib.Plugin\GameLib.Plugin.BattleNet\GameLib.Plugin.BattleNet.csproj" />
1920
<ProjectReference Include="..\..\GameLib.Plugin\GameLib.Plugin.Origin\GameLib.Plugin.Origin.csproj" />

GameLib.Demo/GameLib.Demo.Wpf/GameLib.Demo.Wpf.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
</ItemGroup>
6060

6161
<ItemGroup>
62+
<ProjectReference Include="..\..\GameLib.Plugin\GameLib.Plugin.RiotGames\GameLib.Plugin.RiotGames.csproj" />
6263
<ProjectReference Include="..\..\GameLib\GameLib.csproj" />
6364
<ProjectReference Include="..\..\GameLib.Plugin\GameLib.Plugin.BattleNet\GameLib.Plugin.BattleNet.csproj" />
6465
<ProjectReference Include="..\..\GameLib.Plugin\GameLib.Plugin.Epic\GameLib.Plugin.Epic.csproj" />

GameLib.Plugin.RiotGames/GameLib.Plugin.RiotGames.csproj renamed to GameLib.Plugin/GameLib.Plugin.RiotGames/GameLib.Plugin.RiotGames.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<ProjectReference Include="..\GameLib.Core\GameLib.Core.csproj" />
19+
<ProjectReference Include="..\..\GameLib.Core\GameLib.Core.csproj" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

GameLib.Plugin.RiotGames/Properties/Resources.Designer.cs renamed to GameLib.Plugin/GameLib.Plugin.RiotGames/Properties/Resources.Designer.cs

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GameLib.Plugin.RiotGames/Properties/Resources.resx renamed to GameLib.Plugin/GameLib.Plugin.RiotGames/Properties/Resources.resx

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
121+
<data name="Logo32px" type="System.Resources.ResXFileRef, System.Windows.Forms">
122+
<value>..\Resources\Logo32px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123+
</data>
121124
<data name="RiotGames" type="System.Resources.ResXFileRef, System.Windows.Forms">
122125
<value>..\Resources\RiotGames.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123126
</data>
Loading
Loading

GameLib.Plugin.RiotGames/RiotGamesFactory.cs renamed to GameLib.Plugin/GameLib.Plugin.RiotGames/RiotGamesFactory.cs

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
using GameLib.Core;
22
using GameLib.Plugin.RiotGames.Model;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Text;
73
using System.Text.RegularExpressions;
8-
using System.Threading.Tasks;
94
using YamlDotNet.Serialization;
105

116
namespace GameLib.Plugin.RiotGames
127
{
138
internal static class RiotGamesFactory
149
{
15-
private static List<string> processes = new List<string> { "RiotClientServices", "RiotClientUx", "RiotClientUxRender",
10+
private static readonly List<string> Processes = new List<string> { "RiotClientServices", "RiotClientUx", "RiotClientUxRender",
1611
"VALORANT-Win64-Shipping", "LeagueClient", "LeagueClientUx", "League of Legends", "LoR" };
17-
public async static Task<IEnumerable<IGame>> GetGames(ILauncher launcher, CancellationToken cancellationToken = default)
12+
public static async Task<IEnumerable<IGame>> GetGames(ILauncher launcher, CancellationToken cancellationToken = default)
1813
{
1914
var games = new List<IGame>();
2015
var basePath = @"C:\\ProgramData\\Riot Games\\Metadata";
@@ -38,30 +33,30 @@ public async static Task<IEnumerable<IGame>> GetGames(ILauncher launcher, Cancel
3833
{
3934
continue;
4035
}
41-
var streamData = new StringReader(await File.ReadAllTextAsync(path));
36+
var streamData = new StringReader(await File.ReadAllTextAsync(path, cancellationToken));
4237
var deserializer = new DeserializerBuilder()
4338
.WithNamingConvention(YamlDotNet.Serialization.NamingConventions.LowerCaseNamingConvention.Instance)
4439
.IgnoreUnmatchedProperties()
4540
.Build();
4641

4742
var yamlData = deserializer.Deserialize<dynamic>(streamData);
48-
string full_path = string.Empty;
49-
string shortcut = string.Empty;
43+
string fullPath;
44+
string shortcut;
5045
if (!yamlData.ContainsKey("product_install_full_path") || !yamlData.ContainsKey("shortcut_name"))
5146
{
5247
continue;
5348
}
54-
full_path = yamlData["product_install_full_path"];
49+
fullPath = yamlData["product_install_full_path"];
5550
shortcut = yamlData["shortcut_name"];
5651

5752
games.Add(new Game
5853
{
5954
Id = yamlData.GetHashCode().ToString(),
6055
LauncherId = launcher.Id,
6156
Name = shortcut.Split(".lnk")[0],
62-
InstallDir = full_path,
63-
Executables = processes,
64-
WorkingDir = full_path,
57+
InstallDir = fullPath,
58+
Executables = Processes,
59+
WorkingDir = fullPath,
6560
LaunchString = $"--launch-product={splittedPath[0]} --launch-patchline=live"
6661
});
6762

GameLib.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameLib.Plugin.BattleNet",
2525
EndProject
2626
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GameLib.Plugin.Rockstar", "GameLib.Plugin\GameLib.Plugin.Rockstar\GameLib.Plugin.Rockstar.csproj", "{F939BDF8-A0BE-4933-AF20-C0705A699433}"
2727
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameLib.Plugin.RiotGames", "GameLib.Plugin.RiotGames\GameLib.Plugin.RiotGames.csproj", "{C357DFFA-DFF3-47C1-9939-45BA6875EE81}"
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameLib.Plugin.RiotGames", "GameLib.Plugin\GameLib.Plugin.RiotGames\GameLib.Plugin.RiotGames.csproj", "{C357DFFA-DFF3-47C1-9939-45BA6875EE81}"
2929
EndProject
3030
Global
3131
GlobalSection(SolutionConfigurationPlatforms) = preSolution

GameLib/GameLib.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@
6161

6262
<ItemGroup>
6363
<ProjectReference Include="..\GameLib.Core\GameLib.Core.csproj" PrivateAssets="all" />
64-
<ProjectReference Include="..\GameLib.Plugin.RiotGames\GameLib.Plugin.RiotGames.csproj" />
6564
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.BattleNet\GameLib.Plugin.BattleNet.csproj" PrivateAssets="all" />
6665
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.Epic\GameLib.Plugin.Epic.csproj" PrivateAssets="all" />
6766
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.Gog\GameLib.Plugin.Gog.csproj" PrivateAssets="all" />
6867
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.Origin\GameLib.Plugin.Origin.csproj" PrivateAssets="all" />
68+
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.RiotGames\GameLib.Plugin.RiotGames.csproj" PrivateAssets="all" />
6969
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.Rockstar\GameLib.Plugin.Rockstar.csproj" PrivateAssets="all" />
7070
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.Steam\GameLib.Plugin.Steam.csproj" PrivateAssets="all" />
7171
<ProjectReference Include="..\GameLib.Plugin\GameLib.Plugin.Ubisoft\GameLib.Plugin.Ubisoft.csproj" PrivateAssets="all" />

0 commit comments

Comments
 (0)