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
|
||||
{
|
||||
|
||||
// TODO: Test class, delete later
|
||||
[JsonObject]
|
||||
public class Test
|
||||
{
|
||||
[JsonProperty]
|
||||
public string Name;
|
||||
}
|
||||
|
||||
public class Main : ModBehaviour
|
||||
{
|
||||
public static AssetBundle NHAssetBundle { get; private set; }
|
||||
@ -114,16 +122,25 @@ namespace NewHorizons
|
||||
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
||||
}
|
||||
|
||||
// TODO: Test class, delete later
|
||||
[JsonObject]
|
||||
public class Test
|
||||
#region Assembly Stuff
|
||||
|
||||
public static Assembly ResolveAssembly(object sender, ResolveEventArgs e)
|
||||
{
|
||||
[JsonProperty]
|
||||
public string Name;
|
||||
Logger.LogError($"Couldn't resolve assembly: {e.Name} from {e.RequestingAssembly.FullName}... Trying to fix it.");
|
||||
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()
|
||||
{
|
||||
AppDomain.CurrentDomain.AssemblyResolve += ResolveAssembly;
|
||||
|
||||
// Patches
|
||||
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly());
|
||||
|
||||
@ -142,15 +159,8 @@ namespace NewHorizons
|
||||
|
||||
Logger.Log("Begin load of config files...", Logger.LogType.Log);
|
||||
|
||||
try
|
||||
{
|
||||
_bodySchema = JsonSchema.FromType<Test>();
|
||||
}
|
||||
catch (TypeLoadException te)
|
||||
{
|
||||
Logger.LogError(te.ToString());
|
||||
Application.Quit();
|
||||
}
|
||||
_bodySchema = JsonSchema.FromType<Test>();
|
||||
Logger.LogWarning(_bodySchema.ToString());
|
||||
|
||||
|
||||
try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user