mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Im going bonkers
This commit is contained in:
parent
09762a0f53
commit
821c3bf919
Binary file not shown.
Binary file not shown.
@ -22,6 +22,14 @@ using Logger = NewHorizons.Utility.Logger;
|
|||||||
namespace NewHorizons
|
namespace NewHorizons
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// TODO: Test class, delete later
|
||||||
|
[JsonObject]
|
||||||
|
public class Test
|
||||||
|
{
|
||||||
|
[JsonProperty]
|
||||||
|
public string Name;
|
||||||
|
}
|
||||||
|
|
||||||
public class Main : ModBehaviour
|
public class Main : ModBehaviour
|
||||||
{
|
{
|
||||||
public static AssetBundle NHAssetBundle { get; private set; }
|
public static AssetBundle NHAssetBundle { get; private set; }
|
||||||
@ -114,16 +122,25 @@ namespace NewHorizons
|
|||||||
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Test class, delete later
|
#region Assembly Stuff
|
||||||
[JsonObject]
|
|
||||||
public class Test
|
public static Assembly ResolveAssembly(object sender, ResolveEventArgs e)
|
||||||
{
|
{
|
||||||
[JsonProperty]
|
Logger.LogError($"Couldn't resolve assembly: {e.Name} from {e.RequestingAssembly.FullName}... Trying to fix it.");
|
||||||
public string Name;
|
if (e.Name.Contains("Namotion.Reflection"))
|
||||||
|
return Assembly.LoadFrom("Namotion.Reflection.dll");
|
||||||
|
else if (e.Name.Contains("Microsoft.CSharp"))
|
||||||
|
return Assembly.LoadFrom("Microsoft.CSharp.dll");
|
||||||
|
else
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
|
AppDomain.CurrentDomain.AssemblyResolve += ResolveAssembly;
|
||||||
|
|
||||||
// Patches
|
// Patches
|
||||||
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly());
|
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly());
|
||||||
|
|
||||||
@ -142,15 +159,8 @@ namespace NewHorizons
|
|||||||
|
|
||||||
Logger.Log("Begin load of config files...", Logger.LogType.Log);
|
Logger.Log("Begin load of config files...", Logger.LogType.Log);
|
||||||
|
|
||||||
try
|
_bodySchema = JsonSchema.FromType<Test>();
|
||||||
{
|
Logger.LogWarning(_bodySchema.ToString());
|
||||||
_bodySchema = JsonSchema.FromType<Test>();
|
|
||||||
}
|
|
||||||
catch (TypeLoadException te)
|
|
||||||
{
|
|
||||||
Logger.LogError(te.ToString());
|
|
||||||
Application.Quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user