2021-10-13 03:59:54 +00:00
|
|
|
using Wabbajack.Downloaders.GameFile;
|
2021-09-27 12:42:46 +00:00
|
|
|
using Wabbajack.DTOs;
|
|
|
|
using Wabbajack.Paths;
|
|
|
|
using Wabbajack.Paths.IO;
|
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
namespace Wabbajack.Services.OSIntegrated;
|
|
|
|
|
|
|
|
public class StubbedGameLocator : IGameLocator
|
2021-09-27 12:42:46 +00:00
|
|
|
{
|
2021-10-23 16:51:17 +00:00
|
|
|
private readonly TemporaryPath _location;
|
|
|
|
private readonly TemporaryFileManager _manager;
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
public StubbedGameLocator(TemporaryFileManager manager)
|
|
|
|
{
|
|
|
|
_manager = manager;
|
|
|
|
_location = manager.CreateFolder();
|
|
|
|
}
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
public AbsolutePath GameLocation(Game game)
|
|
|
|
{
|
|
|
|
return _location.Path;
|
|
|
|
}
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
public bool IsInstalled(Game game)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2021-09-27 12:42:46 +00:00
|
|
|
|
2021-10-23 16:51:17 +00:00
|
|
|
public bool TryFindLocation(Game game, out AbsolutePath path)
|
|
|
|
{
|
|
|
|
path = _location.Path;
|
|
|
|
return true;
|
2021-09-27 12:42:46 +00:00
|
|
|
}
|
|
|
|
}
|