first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System.IO;
using NitroxModel.Platforms.Store.Interfaces;
namespace NitroxModel.Platforms.Store;
public static class GamePlatforms
{
public static readonly IGamePlatform[] AllPlatforms = [new Steam(), new EpicGames(), new Discord(), new MSStore()];
public static IGamePlatform GetPlatformByGameDir(string gameRootPath)
{
if (!Directory.Exists(gameRootPath))
{
return null;
}
foreach (IGamePlatform platform in AllPlatforms)
{
if (platform.OwnsGame(gameRootPath))
{
return platform;
}
}
return null;
}
}