This repository has been archived by the owner on Feb 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for neos version 2021.10.17.1326
- Loading branch information
Showing
2 changed files
with
81 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")] |