Take in account ForcedAutorun for legacy as well
This commit is contained in:
committed by
Maplewheels
parent
dfb31eef16
commit
6b8a0a7dca
+8
-4
@@ -323,13 +323,17 @@ public sealed class ModConfigService : IModConfigService
|
|||||||
if (_storageService.FindFilesInPackage(src, "Lua", "*.lua", true)
|
if (_storageService.FindFilesInPackage(src, "Lua", "*.lua", true)
|
||||||
is { IsSuccess: true, Value.IsDefaultOrEmpty: false } result)
|
is { IsSuccess: true, Value.IsDefaultOrEmpty: false } result)
|
||||||
{
|
{
|
||||||
var autorun = result.Value
|
ImmutableArray<string> cleanedResult = result.Value.Select(fp => fp.CleanUpPathCrossPlatform()).ToImmutableArray();
|
||||||
.Where(fp => fp.CleanUpPathCrossPlatform().Contains("Lua/Autorun/"))
|
|
||||||
|
ImmutableArray<string> autorun = cleanedResult
|
||||||
|
.Where(fp => fp.Contains("Lua/ForcedAutorun/") || fp.Contains("Lua/Autorun/"))
|
||||||
.ToImmutableArray();
|
.ToImmutableArray();
|
||||||
var autorunFP = autorun.Select(fp => ContentPath.FromRaw(src,
|
|
||||||
|
ImmutableArray<ContentPath> autorunFP = autorun.Select(fp => ContentPath.FromRaw(src,
|
||||||
$"%ModDir%/{Path.GetRelativePath(src.Dir, fp)}".CleanUpPathCrossPlatform()))
|
$"%ModDir%/{Path.GetRelativePath(src.Dir, fp)}".CleanUpPathCrossPlatform()))
|
||||||
.ToImmutableArray();
|
.ToImmutableArray();
|
||||||
var reg = result.Value.Except(autorun)
|
|
||||||
|
ImmutableArray<ContentPath> reg = cleanedResult.Except(autorun)
|
||||||
.Select(fp => ContentPath.FromRaw(src,
|
.Select(fp => ContentPath.FromRaw(src,
|
||||||
$"%ModDir%/{Path.GetRelativePath(src.Dir, fp)}".CleanUpPathCrossPlatform()))
|
$"%ModDir%/{Path.GetRelativePath(src.Dir, fp)}".CleanUpPathCrossPlatform()))
|
||||||
.ToImmutableArray();
|
.ToImmutableArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user