From ed09908c3b54cc135c22bb4217ed96304b9e018a Mon Sep 17 00:00:00 2001 From: Maplewheels Date: Sun, 25 Jan 2026 16:50:58 -0500 Subject: [PATCH] - Added default load context type resolution. --- .../LuaCs/Services/PluginManagementService.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs index 9cd47e486..ba160ab66 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs @@ -119,9 +119,18 @@ public class PluginManagementService : IPluginManagementService, IAssemblyManage if (includeDefaultContext) { var type = Type.GetType(typeName, false); + if (type is not null) + { + if (isByRefType) + { + return type.MakeByRefType(); + } + + return type; + } } - - // TODO: implement by-ref type resolution + + //TODO: implement ALC resolutions. throw new NotImplementedException(); }