mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #1313 from LostDragonist/origin_fix2
More fixes to Origin game detection
This commit is contained in:
commit
7c8c413105
@ -79,6 +79,7 @@ namespace Wabbajack.Common
|
|||||||
// to get these ids, split the numbers from the letters in file names found in
|
// to get these ids, split the numbers from the letters in file names found in
|
||||||
// C:\ProgramData\Origin\LocalContent\{game name)\*.mfst
|
// C:\ProgramData\Origin\LocalContent\{game name)\*.mfst
|
||||||
// So for DA:O this is "DR208591800.mfst" -> "DR:208591800"
|
// So for DA:O this is "DR208591800.mfst" -> "DR:208591800"
|
||||||
|
// EAPlay games may have @subscription appended to the file name
|
||||||
public List<string> OriginIDs { get; set; } = new();
|
public List<string> OriginIDs { get; set; } = new();
|
||||||
|
|
||||||
public List<string> EpicGameStoreIDs { get; internal set; } = new List<string>();
|
public List<string> EpicGameStoreIDs { get; internal set; } = new List<string>();
|
||||||
|
@ -15,7 +15,7 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
|
|
||||||
public override StoreType Type { get; internal set; } = StoreType.Origin;
|
public override StoreType Type { get; internal set; } = StoreType.Origin;
|
||||||
|
|
||||||
private static Regex SplitRegex = new Regex("[0-9]+");
|
private static Regex SplitRegex = new Regex("(.*)([0-9]+)(@subscription)?", RegexOptions.RightToLeft);
|
||||||
public override bool Init()
|
public override bool Init()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -30,8 +30,8 @@ namespace Wabbajack.Common.StoreHandlers
|
|||||||
{
|
{
|
||||||
var result = SplitRegex.Match(f);
|
var result = SplitRegex.Match(f);
|
||||||
if (result == null) return default;
|
if (result == null) return default;
|
||||||
var a = f.Substring(0, result.Index);
|
var a = result.Groups[1];
|
||||||
var b = f.Substring(result.Index);
|
var b = result.Groups[2];
|
||||||
return a + ":" + b;
|
return a + ":" + b;
|
||||||
})
|
})
|
||||||
.Where(t => t != default)
|
.Where(t => t != default)
|
||||||
|
Loading…
Reference in New Issue
Block a user