fix compatibility with CringeLauncher
Some checks failed
Build / Compute Version (push) Successful in 6s
Build / Build Nuget package (push) Failing after 6s

This commit is contained in:
2024-12-12 19:44:27 -05:00
parent 4e728d823e
commit 7db71ab013
4 changed files with 91 additions and 139 deletions

View File

@@ -1,4 +1,5 @@
using HarmonyLib;
using CringePlugins.Utils;
using HarmonyLib;
using NLog.Fluent;
using Sandbox;
using Sandbox.Game.Localization;
@@ -33,7 +34,6 @@ namespace SeamlessClient
public static ushort SeamlessClientNetId = 2936;
private List<ComponentBase> allComps = new List<ComponentBase>();
private Assembly thisAssembly => typeof(Seamless).Assembly;
private bool Initilized = false;
public static bool isSeamlessServer { get; private set; } = false;
public static bool isDebug = false;
@@ -56,11 +56,9 @@ namespace SeamlessClient
private void GetComponents()
{
int failedCount = 0;
foreach (Type type in thisAssembly.GetTypes())
foreach (Type type in IntrospectionContext.Global.CollectDerivedTypes<ComponentBase>(typeof(Seamless).Module))
{
if (type.BaseType != typeof(ComponentBase))
continue;
try
{