From b626fd1e47f4106c48b281bcf67e652cf9989f5d Mon Sep 17 00:00:00 2001 From: Maplewheels Date: Sun, 25 Jan 2026 17:04:22 -0500 Subject: [PATCH] - The GetType lag situation is craazy. --- .../LuaCs/Services/PluginManagementService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs index ba160ab66..83aa9d1d0 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/PluginManagementService.cs @@ -130,6 +130,14 @@ public class PluginManagementService : IPluginManagementService, IAssemblyManage } } + //TODO: the lag situation here is craazy + var t = AssemblyLoadContext.All + .SelectMany(alc => alc.Assemblies) + .SelectMany(ass => ass.GetSafeTypes()) + .FirstOrDefault(tp => tp.FullName?.Equals(typeName) ?? tp.Name.Equals(typeName), null); + + return t; + //TODO: implement ALC resolutions. throw new NotImplementedException(); }