mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Hard ::(
This commit is contained in:
parent
0a061ecbcc
commit
09762a0f53
BIN
NJsonSchema/NJsonSchema.dll
Normal file
BIN
NJsonSchema/NJsonSchema.dll
Normal file
Binary file not shown.
BIN
NJsonSchema/Namotion.Reflection.dll
Normal file
BIN
NJsonSchema/Namotion.Reflection.dll
Normal file
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using NJsonSchema;
|
||||||
using NewHorizons.Builder.Props;
|
using NewHorizons.Builder.Props;
|
||||||
using NewHorizons.Components;
|
using NewHorizons.Components;
|
||||||
using NewHorizons.External.Configs;
|
using NewHorizons.External.Configs;
|
||||||
@ -12,12 +13,15 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using Logger = NewHorizons.Utility.Logger;
|
using Logger = NewHorizons.Utility.Logger;
|
||||||
|
|
||||||
namespace NewHorizons
|
namespace NewHorizons
|
||||||
{
|
{
|
||||||
|
|
||||||
public class Main : ModBehaviour
|
public class Main : ModBehaviour
|
||||||
{
|
{
|
||||||
public static AssetBundle NHAssetBundle { get; private set; }
|
public static AssetBundle NHAssetBundle { get; private set; }
|
||||||
@ -35,6 +39,8 @@ namespace NewHorizons
|
|||||||
|
|
||||||
public static float SecondsLeftInLoop = -1;
|
public static float SecondsLeftInLoop = -1;
|
||||||
|
|
||||||
|
private static JsonSchema _bodySchema;
|
||||||
|
|
||||||
public static bool IsSystemReady { get; private set; }
|
public static bool IsSystemReady { get; private set; }
|
||||||
public static float FurthestOrbit { get; set; } = 50000f;
|
public static float FurthestOrbit { get; set; } = 50000f;
|
||||||
|
|
||||||
@ -108,6 +114,14 @@ namespace NewHorizons
|
|||||||
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Test class, delete later
|
||||||
|
[JsonObject]
|
||||||
|
public class Test
|
||||||
|
{
|
||||||
|
[JsonProperty]
|
||||||
|
public string Name;
|
||||||
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
// Patches
|
// Patches
|
||||||
@ -121,13 +135,24 @@ namespace NewHorizons
|
|||||||
|
|
||||||
Instance = this;
|
Instance = this;
|
||||||
GlobalMessenger<DeathType>.AddListener("PlayerDeath", OnDeath);
|
GlobalMessenger<DeathType>.AddListener("PlayerDeath", OnDeath);
|
||||||
GlobalMessenger.AddListener("WakeUp", new Callback(OnWakeUp));
|
GlobalMessenger.AddListener("WakeUp", OnWakeUp);
|
||||||
NHAssetBundle = ModHelper.Assets.LoadBundle("AssetBundle/xen.newhorizons");
|
NHAssetBundle = ModHelper.Assets.LoadBundle("AssetBundle/xen.newhorizons");
|
||||||
|
|
||||||
ResetConfigs(resetTranslation: false);
|
ResetConfigs(resetTranslation: false);
|
||||||
|
|
||||||
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>();
|
||||||
|
}
|
||||||
|
catch (TypeLoadException te)
|
||||||
|
{
|
||||||
|
Logger.LogError(te.ToString());
|
||||||
|
Application.Quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LoadConfigs(this);
|
LoadConfigs(this);
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="..\NJsonSchema\*.dll" />
|
||||||
<PackageReference Include="HarmonyX" Version="2.10.0" />
|
<PackageReference Include="HarmonyX" Version="2.10.0" />
|
||||||
<PackageReference Include="OWML" Version="2.3.3" />
|
<PackageReference Include="OWML" Version="2.3.3" />
|
||||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.12.168" />
|
<PackageReference Include="OuterWildsGameLibs" Version="1.1.12.168" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user