Implement BD+ detection (#24)

This commit is contained in:
SilasLaspada
2021-03-14 15:23:24 -06:00
committed by GitHub
parent 152f6c7051
commit 11a82addd8
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace BurnOutSharp.ProtectionType
{
public class BDPlus : IPathCheck
{
// TODO: Figure out how to detect version
/// <inheritdoc/>
public string CheckPath(string path, bool isDirectory, IEnumerable<string> files)
{
// Multiple .svm files should always be present, but as far as I can tell, 00000.svm is the first one made and should be present no matter what.
if (isDirectory)
{
if (files.Any(f => f.Contains(Path.Combine("BDSVM", "00000.svm")))
&& files.Any(f => f.Contains(Path.Combine("BDSVM", "BACKUP", "00000.svm"))))
{
return "BD+";
}
}
return null;
}
}
}

View File

@@ -26,6 +26,7 @@ Below is a list of the protections that can be detected using this code:
- ActiveMARK / ActiveMARK 5
- Alpha-DVD
- Alpha-ROM
- BD+
- Bitpool
- ByteShield
- Cactus Data Shield