From 6b8a0a7dca71343dcd6b97f4fa04155343c07b08 Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Thu, 29 Jan 2026 22:05:32 -0300 Subject: [PATCH] Take in account ForcedAutorun for legacy as well --- .../LuaCs/Services/Processing/ModConfigService.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Processing/ModConfigService.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Processing/ModConfigService.cs index 2ad82d06c..205d8b98e 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Processing/ModConfigService.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Processing/ModConfigService.cs @@ -323,13 +323,17 @@ public sealed class ModConfigService : IModConfigService if (_storageService.FindFilesInPackage(src, "Lua", "*.lua", true) is { IsSuccess: true, Value.IsDefaultOrEmpty: false } result) { - var autorun = result.Value - .Where(fp => fp.CleanUpPathCrossPlatform().Contains("Lua/Autorun/")) + ImmutableArray cleanedResult = result.Value.Select(fp => fp.CleanUpPathCrossPlatform()).ToImmutableArray(); + + ImmutableArray autorun = cleanedResult + .Where(fp => fp.Contains("Lua/ForcedAutorun/") || fp.Contains("Lua/Autorun/")) .ToImmutableArray(); - var autorunFP = autorun.Select(fp => ContentPath.FromRaw(src, + + ImmutableArray autorunFP = autorun.Select(fp => ContentPath.FromRaw(src, $"%ModDir%/{Path.GetRelativePath(src.Dir, fp)}".CleanUpPathCrossPlatform())) .ToImmutableArray(); - var reg = result.Value.Except(autorun) + + ImmutableArray reg = cleanedResult.Except(autorun) .Select(fp => ContentPath.FromRaw(src, $"%ModDir%/{Path.GetRelativePath(src.Dir, fp)}".CleanUpPathCrossPlatform())) .ToImmutableArray();