From 232f7203e2adcd3517655d7a0b45379eefb26732 Mon Sep 17 00:00:00 2001 From: MapleWheels Date: Tue, 7 Apr 2026 16:07:55 -0400 Subject: [PATCH] Fixed shared Csharp src files not being included if there weren't also architecture-specific files. --- .../LuaCs/_Services/ModConfigService.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/ModConfigService.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/ModConfigService.cs index f9abe7371..3882a0175 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/ModConfigService.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Services/ModConfigService.cs @@ -320,6 +320,7 @@ public sealed class ModConfigService : IModConfigService foreach (var searchPathways in srcSearchInd) { + // we have architecture dependent files as well if (_storageService.FindFilesInPackage(srcPackage, searchPathways.SubFolder, "*.cs", true) is { IsSuccess: true, Value.IsDefaultOrEmpty: false } result) { @@ -342,6 +343,25 @@ public sealed class ModConfigService : IModConfigService IsReferenceModeOnly = false }); } + // add the shared files by themselves + else if (!sharedFiles.IsDefaultOrEmpty) + { + builder.Add(new AssemblyResourceInfo() + { + OwnerPackage = srcPackage, + InternalName = searchPathways.SubFolder, + SupportedPlatforms = searchPathways.Platforms, + SupportedTargets = searchPathways.Targets, + LoadPriority = 0, + FilePaths = sharedFiles, + FriendlyName = IAssemblyLoaderService.InternalsAwareAssemblyName, + IncompatiblePackages = ImmutableArray.Empty, + RequiredPackages = ImmutableArray.Empty, + UseInternalAccessName = true, + IsScript = true, + IsReferenceModeOnly = false + }); + } } return builder.ToImmutable();