LinuxGameLocationProvider.cs 882 B

1234567891011121314151617181920212223
  1. using System.IO;
  2. namespace FF8
  3. {
  4. public sealed class LinuxGameLocationProvider : IGameLocationProvider
  5. {
  6. public GameLocation GetGameLocation()
  7. {
  8. if (_hardcoded.FindGameLocation(out var gameLocation))
  9. return gameLocation;
  10. throw new DirectoryNotFoundException($"Cannot find game directory." +
  11. $"Add your own path to the {nameof(LinuxGameLocationProvider)} type.");
  12. }
  13. private readonly HardcodedGameLocationProvider _hardcoded = new HardcodedGameLocationProvider(new[]
  14. {
  15. "/home/robert/FINAL_FANTASY_VIII",
  16. "/media/griever/Data/SteamLibrary/steamapps/common/FINAL FANTASY VIII",
  17. "/home/griever/.PlayOnLinux/wineprefix/Steam/drive_c/Program Files/Steam/steamapps/common/FINAL FANTASY VIII"
  18. });
  19. }
  20. }