public int LoadPatches(System.Reflection.Assembly Assembly)
        {
            Patches.BasePatch.Injector     = this;
            Patches.BasePatch.GameModule   = Mono.Cecil.AssemblyDefinition.ReadAssembly(PathZ.Combine(_ApplicationPath, "StarshipTheory_Data", "Managed", "Assembly-CSharp.dll")).MainModule;
            Patches.BasePatch.ModLibModule = Mono.Cecil.AssemblyDefinition.ReadAssembly(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "StarshipTheory.ModLib.dll")).MainModule;

            _Patches = new List <Patches.BasePatch>();
            new InjectionHelper(this);

            Type BasePatchType = typeof(Patches.BasePatch);
            int  LoadedPatches = 0;

            foreach (Type PatchType in Assembly.GetTypes().Where(t => t.IsSubclassOf(BasePatchType) && !t.IsInterface && !t.IsAbstract))
            {
                try
                {
                    Patches.BasePatch P = (Patches.BasePatch)Activator.CreateInstance(PatchType);
                    _Patches.Add(P);
                    LoadedPatches++;
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error Initializing Patch " + PatchType.Name + ": " + ex.Message);
                    Error?.Invoke(this, new StringEventArgs("Error Initializing Patch '" + PatchType.Name + "': " + ex.Message));
                }
            }

            return(LoadedPatches);
        }
 public void LoadPatch(Patches.BasePatch patch)
 {
     _Patches.Add(patch);
 }