WTF WORK!!!!

This commit is contained in:
Nick 2023-07-27 00:26:19 -04:00
parent 5b18221000
commit af1dffa320

View File

@ -8,7 +8,6 @@ using NewHorizons.External.Modules.Props;
using NewHorizons.External.Modules.Props.Audio;
using NewHorizons.External.Modules.Props.Dialogue;
using NewHorizons.External.SerializableData;
using NewHorizons.OtherMods.MenuFramework;
using NewHorizons.Utility;
using NewHorizons.Utility.OWML;
using Newtonsoft.Json;
@ -62,7 +61,7 @@ namespace NewHorizons
if (!Main.BodyDict.ContainsKey(body.Config.starSystem)) Main.BodyDict.Add(body.Config.starSystem, new List<NewHorizonsBody>());
Main.BodyDict[body.Config.starSystem].Add(body);
}
catch(Exception ex)
catch (Exception ex)
{
NHLogger.LogError($"Error in Create API:\n{ex}");
}
@ -143,7 +142,8 @@ namespace NewHorizons
public T QueryBody<T>(string bodyName, string jsonPath)
{
var data = QueryBody(typeof(T), bodyName, jsonPath);
if (data is T result) {
if (data is T result)
{
return result;
}
return default;
@ -157,9 +157,11 @@ namespace NewHorizons
: QueryJson(outType, Path.Combine(system.Mod.ModHelper.Manifest.ModFolderPath, system.RelativePath), jsonPath);
}
public T QuerySystem<T>(string jsonPath) {
public T QuerySystem<T>(string jsonPath)
{
var data = QuerySystem(typeof(T), jsonPath);
if (data is T result) {
if (data is T result)
{
return result;
}
return default;
@ -169,7 +171,8 @@ namespace NewHorizons
float scale, bool alignRadial)
{
var prefab = SearchUtilities.Find(propToCopyPath);
var detailInfo = new DetailInfo() {
var detailInfo = new DetailInfo()
{
position = position,
rotation = eulerAngles,
scale = scale,