From 134c0be3f269586c1ee990beec040e7e9557b5a1 Mon Sep 17 00:00:00 2001 From: EIA485 <17285570+EIA485@users.noreply.github.com> Date: Sun, 17 Oct 2021 16:10:38 -0700 Subject: [PATCH] fix for neos version 2021.10.17.1326 --- NeosModLoader/ExecutionHook.cs | 91 ++++++++++++------------ NeosModLoader/Properties/AssemblyInfo.cs | 70 +++++++++--------- 2 files changed, 81 insertions(+), 80 deletions(-) diff --git a/NeosModLoader/ExecutionHook.cs b/NeosModLoader/ExecutionHook.cs index a645485..5334b85 100644 --- a/NeosModLoader/ExecutionHook.cs +++ b/NeosModLoader/ExecutionHook.cs @@ -1,45 +1,46 @@ -using FrooxEngine; -using System; - -namespace NeosModLoader -{ - [ImplementableClass(true)] - class ExecutionHook - { -#pragma warning disable CS0169 - // field must exist due to reflective access - private static Type __connectorType; -#pragma warning restore CS0169 - - static ExecutionHook() - { - try - { - Logger.MsgInternal($"NeosModLoader v{ModLoader.VERSION} starting up!{(Configuration.get().Debug ? " Debug logs will be shown." : "")}"); - NeosVersionReset.Initialize(); - ModLoader.LoadMods(); - } - catch (Exception e) // it's important that this doesn't send exceptions back to Neos - { - Logger.ErrorInternal($"Exception in execution hook!\n{e}"); - } - } - - // implementation not strictly required, but method must exist due to reflective access - private static DummyConnector InstantiateConnector() - { - return new DummyConnector(); - } - - // type must match return type of InstantiateConnector() - private class DummyConnector : IConnector - { - public IImplementable Owner { get; private set; } - public void ApplyChanges() { } - public void AssignOwner(IImplementable owner) => Owner = owner; - public void Destroy(bool destroyingWorld) { } - public void Initialize() { } - public void RemoveOwner() => Owner = null; - } - } -} +using FrooxEngine; +using System; + +namespace NeosModLoader +{ + [ImplementableClass(true)] + class ExecutionHook + { +#pragma warning disable CS0169 + // field must exist due to reflective access + private static Type __connectorType; + private static Type __connectorTypes; +#pragma warning restore CS0169 + + static ExecutionHook() + { + try + { + Logger.MsgInternal($"NeosModLoader v{ModLoader.VERSION} starting up!{(Configuration.get().Debug ? " Debug logs will be shown." : "")}"); + NeosVersionReset.Initialize(); + ModLoader.LoadMods(); + } + catch (Exception e) // it's important that this doesn't send exceptions back to Neos + { + Logger.ErrorInternal($"Exception in execution hook!\n{e}"); + } + } + + // implementation not strictly required, but method must exist due to reflective access + private static DummyConnector InstantiateConnector() + { + return new DummyConnector(); + } + + // type must match return type of InstantiateConnector() + private class DummyConnector : IConnector + { + public IImplementable Owner { get; private set; } + public void ApplyChanges() { } + public void AssignOwner(IImplementable owner) => Owner = owner; + public void Destroy(bool destroyingWorld) { } + public void Initialize() { } + public void RemoveOwner() => Owner = null; + } + } +} diff --git a/NeosModLoader/Properties/AssemblyInfo.cs b/NeosModLoader/Properties/AssemblyInfo.cs index e67f11c..ff2f80e 100644 --- a/NeosModLoader/Properties/AssemblyInfo.cs +++ b/NeosModLoader/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NeosModLoader")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NeosModLoader")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d4627c7f-8091-477a-abdc-f1465d94d8d9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.3.1.0")] -[assembly: AssemblyFileVersion("1.3.1.0")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NeosModLoader")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NeosModLoader")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d4627c7f-8091-477a-abdc-f1465d94d8d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.4.0.0")] +[assembly: AssemblyFileVersion("1.4.0.0")]