MORE REARRANGE!!!!!

This commit is contained in:
Nick 2023-03-25 15:15:24 -04:00
parent c622b54cb6
commit b20c59e860
163 changed files with 643 additions and 574 deletions

View File

@ -1,5 +1,5 @@
using NewHorizons.External.Configs;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using UnityEngine;
namespace NewHorizons.Builder.Atmosphere
{

View File

@ -1,13 +1,14 @@
using NewHorizons.External.Modules;
using NewHorizons.Components;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using System.Collections.Generic;
using Tessellation;
using NewHorizons.Utility.OWUtilities;
using UnityEngine;
namespace NewHorizons.Builder.Atmosphere
{
@ -206,7 +207,7 @@ namespace NewHorizons.Builder.Atmosphere
}
catch (Exception e)
{
Logger.LogError($"Couldn't load Cloud textures for [{atmo.clouds.texturePath}]:\n{e}");
NHLogger.LogError($"Couldn't load Cloud textures for [{atmo.clouds.texturePath}]:\n{e}");
return null;
}
@ -282,7 +283,7 @@ namespace NewHorizons.Builder.Atmosphere
}
catch (Exception e)
{
Logger.LogError($"Couldn't load Cloud texture for [{atmo.clouds.texturePath}]:\n{e}");
NHLogger.LogError($"Couldn't load Cloud texture for [{atmo.clouds.texturePath}]:\n{e}");
return null;
}

View File

@ -1,5 +1,6 @@
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.Files;
using UnityEngine;
namespace NewHorizons.Builder.Atmosphere
{

View File

@ -1,11 +1,13 @@
using NewHorizons.External;
using NewHorizons.External.Configs;
using NewHorizons.External.Modules;
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWML;
using OWML.Common;
using UnityEngine;
using Random = UnityEngine.Random;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Body
{
public static class AsteroidBeltBuilder
@ -20,7 +22,7 @@ namespace NewHorizons.Builder.Body
if (belt.amount >= 0) count = belt.amount;
if (count > 200) count = 200;
Logger.Log($"Generating {count} asteroid belt around {bodyName}");
NHLogger.Log($"Generating {count} asteroid belt around {bodyName}");
Random.InitState(belt.randomSeed);

View File

@ -1,10 +1,11 @@
using NewHorizons.Builder.Props;
using NewHorizons.Components;
using NewHorizons.Components.Orbital;
using NewHorizons.External;
using NewHorizons.External.Modules;
using NewHorizons.External.Modules.Props;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

View File

@ -1,10 +1,11 @@
using NewHorizons.Components;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using OWML.Common;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Body
{
@ -19,7 +20,7 @@ namespace NewHorizons.Builder.Body
_prefab = SearchUtilities.Find("RingWorld_Body/CloakingField_IP")?.InstantiateInactive()?.Rename("CloakingField")?.DontDestroyOnLoad();
if (_prefab == null)
{
Logger.LogWarning($"Tried to make a cloak but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make a cloak but couldn't. Do you have the DLC installed?");
return;
}
else

View File

@ -1,10 +1,10 @@
using NewHorizons.Utility;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using NewHorizons.External.Modules.VariableSize;
using NewHorizons.Components.Orbital;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OWML;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Components.SizeControllers;
namespace NewHorizons.Builder.Body
@ -200,8 +200,8 @@ namespace NewHorizons.Builder.Body
var target = targetAO?.GetAttachedOWRigidbody();
if (target == null)
{
if (targetAO != null) Logger.LogError($"Found funnel target ({targetAO.name}) but couldn't find rigidbody for the funnel {funnelGO.name}");
else Logger.LogError($"Couldn't find the target ({module.target}) for the funnel {funnelGO.name}");
if (targetAO != null) NHLogger.LogError($"Found funnel target ({targetAO.name}) but couldn't find rigidbody for the funnel {funnelGO.name}");
else NHLogger.LogError($"Couldn't find the target ({module.target}) for the funnel {funnelGO.name}");
return;
}

View File

@ -1,11 +1,13 @@
using NewHorizons.Builder.Body.Geometry;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using System.IO;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Body
{
public static class HeightMapBuilder
@ -23,17 +25,17 @@ namespace NewHorizons.Builder.Body
{
if (!string.IsNullOrEmpty(module.heightMap) && !File.Exists(Path.Combine(mod.ModHelper.Manifest.ModFolderPath, module.heightMap)))
{
Logger.LogError($"Bad path for {planetGO.name} heightMap: {module.heightMap} couldn't be found.");
NHLogger.LogError($"Bad path for {planetGO.name} heightMap: {module.heightMap} couldn't be found.");
module.heightMap = null;
}
if (!string.IsNullOrEmpty(module.textureMap) && !File.Exists(Path.Combine(mod.ModHelper.Manifest.ModFolderPath, module.textureMap)))
{
Logger.LogError($"Bad path for {planetGO.name} textureMap: {module.textureMap} couldn't be found.");
NHLogger.LogError($"Bad path for {planetGO.name} textureMap: {module.textureMap} couldn't be found.");
module.textureMap = null;
}
if (!string.IsNullOrEmpty(module.emissionMap) && !File.Exists(Path.Combine(mod.ModHelper.Manifest.ModFolderPath, module.emissionMap)))
{
Logger.LogError($"Bad path for {planetGO.name} emissionMap: {module.emissionMap} couldn't be found.");
NHLogger.LogError($"Bad path for {planetGO.name} emissionMap: {module.emissionMap} couldn't be found.");
module.emissionMap = null;
}
@ -74,7 +76,7 @@ namespace NewHorizons.Builder.Body
}
catch (Exception e)
{
Logger.LogError($"Couldn't load HeightMap textures:\n{e}");
NHLogger.LogError($"Couldn't load HeightMap textures:\n{e}");
return null;
}

View File

@ -2,12 +2,13 @@ using NewHorizons.Builder.Atmosphere;
using NewHorizons.Builder.Props;
using NewHorizons.Components;
using NewHorizons.Components.SizeControllers;
using NewHorizons.External;
using NewHorizons.External.Modules.VariableSize;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWML;
using System;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Body
{
@ -61,7 +62,7 @@ namespace NewHorizons.Builder.Body
// Add remnants
if (remnant != null)
{
Logger.LogVerbose($"Making custom remnant proxy");
NHLogger.LogVerbose($"Making custom remnant proxy");
var remnantGO = new GameObject("Remnant");
remnantGO.transform.parent = proxy.transform;
@ -73,7 +74,7 @@ namespace NewHorizons.Builder.Body
}
else if (body.Config.Star != null && StellarRemnantBuilder.HasRemnant(body.Config.Star))
{
Logger.LogVerbose($"Making remnant proxy");
NHLogger.LogVerbose($"Making remnant proxy");
var remnantGO = new GameObject("Remnant");
remnantGO.transform.parent = proxy.transform;
@ -251,7 +252,7 @@ namespace NewHorizons.Builder.Body
}
catch (Exception ex)
{
Logger.LogError($"Exception thrown when generating proxy for [{body.Config.name}]:\n{ex}");
NHLogger.LogError($"Exception thrown when generating proxy for [{body.Config.name}]:\n{ex}");
return false;
}
}

View File

@ -3,11 +3,12 @@ using NewHorizons.Components.SizeControllers;
using NewHorizons.Components.Volumes;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System.Collections.Generic;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Body
{
@ -67,7 +68,7 @@ namespace NewHorizons.Builder.Body
if (ringTexture == null)
{
Logger.LogError($"Couldn't load Ring texture [{ring.texture}]");
NHLogger.LogError($"Couldn't load Ring texture [{ring.texture}]");
return null;
}

View File

@ -2,14 +2,15 @@ using NewHorizons.External.Configs;
using NewHorizons.Utility;
using NewHorizons.External.Modules.VariableSize;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using System.Collections.Generic;
using NewHorizons.Components.SizeControllers;
using Color = UnityEngine.Color;
using NewHorizons.Components.Volumes;
using NewHorizons.Builder.Props;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OWML;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.External.Modules.SerializableData;
namespace NewHorizons.Builder.Body
{
@ -111,27 +112,27 @@ namespace NewHorizons.Builder.Body
var (blackHoleID, whiteHoleID) = pair;
if (!_singularitiesByID.TryGetValue(blackHoleID, out GameObject blackHole))
{
Logger.LogWarning($"Black hole [{blackHoleID}] is missing.");
NHLogger.LogWarning($"Black hole [{blackHoleID}] is missing.");
break;
}
if (!_singularitiesByID.TryGetValue(whiteHoleID, out GameObject whiteHole))
{
Logger.LogWarning($"White hole [{whiteHoleID}] is missing.");
NHLogger.LogWarning($"White hole [{whiteHoleID}] is missing.");
break;
}
var whiteHoleVolume = whiteHole.GetComponentInChildren<WhiteHoleVolume>();
var blackHoleVolume = blackHole.GetComponentInChildren<BlackHoleVolume>();
if (whiteHoleVolume == null || blackHoleVolume == null)
{
Logger.LogWarning($"Singularities [{blackHoleID}] and [{whiteHoleID}] do not have compatible polarities.");
NHLogger.LogWarning($"Singularities [{blackHoleID}] and [{whiteHoleID}] do not have compatible polarities.");
break;
}
if (blackHoleVolume._whiteHole != null && blackHoleVolume._whiteHole != whiteHoleVolume)
{
Logger.LogWarning($"Black hole [{blackHoleID}] has already been linked!");
NHLogger.LogWarning($"Black hole [{blackHoleID}] has already been linked!");
break;
}
Logger.LogVerbose($"Pairing singularities [{blackHoleID}], [{whiteHoleID}]");
NHLogger.LogVerbose($"Pairing singularities [{blackHoleID}], [{whiteHoleID}]");
blackHoleVolume._whiteHole = whiteHoleVolume;
}
}

View File

@ -5,7 +5,8 @@ using NewHorizons.External.Modules.VariableSize;
using OWML.Common;
using System.Linq;
using NewHorizons.Components.Stars;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.Files;
namespace NewHorizons.Builder.Body
{

View File

@ -1,11 +1,13 @@
using NewHorizons.Builder.General;
using NewHorizons.External;
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.External.Modules.VariableSize;
using NewHorizons.Utility;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using UnityEngine;
using Color = UnityEngine.Color;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Body
{
@ -21,7 +23,7 @@ namespace NewHorizons.Builder.Body
try
{
Logger.Log($"Creating stellar remnant for [{star.Config.name}]");
NHLogger.Log($"Creating stellar remnant for [{star.Config.name}]");
var sector = SectorBuilder.Make(go, rb, soi);
sector.name = "StellarRemnant";
@ -58,7 +60,7 @@ namespace NewHorizons.Builder.Body
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make stellar remnant for [{star.Config.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make stellar remnant for [{star.Config.name}]:\n{ex}");
return null;
}
}
@ -149,7 +151,7 @@ namespace NewHorizons.Builder.Body
case StellarRemnantType.BlackHole:
return MakeBlackhole(planet, null, progenitor, proxy);
default:
Logger.LogError($"Couldn't make proxy remnant for {planet.name}");
NHLogger.LogError($"Couldn't make proxy remnant for {planet.name}");
return null;
}
}

View File

@ -4,6 +4,7 @@ using NewHorizons.External.Configs;
using NewHorizons.Components;
using System.Linq;
using OWML.Common;
using NewHorizons.Utility.Files;
namespace NewHorizons.Builder.Body
{

View File

@ -3,8 +3,8 @@ using NewHorizons.Utility;
using UnityEngine;
using NewHorizons.External.Modules.VariableSize;
using Tessellation;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OWML;
using NewHorizons.Utility.OuterWilds;
namespace NewHorizons.Builder.Body
{

View File

@ -1,6 +1,7 @@
using UnityEngine;
using NewHorizons.Utility;
using NewHorizons.External.Modules;
using NewHorizons.Utility.Files;
namespace NewHorizons.Builder.General
{

View File

@ -1,8 +1,8 @@
using NewHorizons.Components.Orbital;
using NewHorizons.External.Configs;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.General
{
public static class AstroObjectBuilder
@ -54,7 +54,7 @@ namespace NewHorizons.Builder.General
if (config.Base.centerOfSolarSystem)
{
Logger.Log($"Setting center of universe to {config.name}");
NHLogger.Log($"Setting center of universe to {config.name}");
Delay.RunWhen(
() => Locator._centerOfTheUniverse != null,

View File

@ -1,10 +1,11 @@
using NewHorizons.Components.Orbital;
using NewHorizons.External.Configs;
using NewHorizons.Utility;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using System.Collections.Generic;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.General
{
public static class DetectorBuilder
@ -154,7 +155,7 @@ namespace NewHorizons.Builder.General
private static void SetBinaryForceDetectableFields(BinaryFocalPoint point, ConstantForceDetector primaryCFD, ConstantForceDetector secondaryCFD)
{
Logger.Log($"Setting up binary focal point for {point.name}");
NHLogger.Log($"Setting up binary focal point for {point.name}");
var primary = point.Primary;
var secondary = point.Secondary;
@ -165,7 +166,7 @@ namespace NewHorizons.Builder.General
if (primaryGV._falloffType != secondaryGV._falloffType)
{
Logger.LogError($"Binaries must have the same gravity falloff! {primaryGV._falloffType} != {secondaryGV._falloffType}");
NHLogger.LogError($"Binaries must have the same gravity falloff! {primaryGV._falloffType} != {secondaryGV._falloffType}");
return;
}

View File

@ -1,6 +1,6 @@
using NewHorizons.External.Configs;
using NewHorizons.External.Modules;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using UnityEngine;
namespace NewHorizons.Builder.General
{

View File

@ -1,5 +1,5 @@
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using NewHorizons.Utility.OWML;
using UnityEngine;
namespace NewHorizons.Builder.General;
@ -13,12 +13,12 @@ public static class GroupsBuilder
{
if (!sector)
{
Logger.LogWarning($"tried to put groups on {go.name} when sector is null");
NHLogger.LogWarning($"tried to put groups on {go.name} when sector is null");
return;
}
if (go.activeInHierarchy)
{
Logger.LogWarning($"tried to put groups on an active gameobject {go.name}");
NHLogger.LogWarning($"tried to put groups on an active gameobject {go.name}");
return;
}

View File

@ -1,6 +1,7 @@
using NewHorizons.External.Modules;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using UnityEngine;
namespace NewHorizons.Builder.General
{
public static class RFVolumeBuilder

View File

@ -1,12 +1,12 @@
using NewHorizons.Builder.Props;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OWML;
using NewHorizons.Utility.OuterWilds;
using System;
using System.Reflection;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.General
{
public static class SpawnPointBuilder
@ -51,7 +51,7 @@ namespace NewHorizons.Builder.General
if (Main.Instance.IsWarpingFromShip)
{
Logger.LogVerbose("Overriding player spawn to be inside ship");
NHLogger.LogVerbose("Overriding player spawn to be inside ship");
GameObject playerSpawnGO = new GameObject("PlayerSpawnPoint");
playerSpawnGO.transform.parent = ship.transform;
playerSpawnGO.layer = Layer.PlayerSafetyCollider;
@ -71,7 +71,7 @@ namespace NewHorizons.Builder.General
Delay.RunWhen(() => Main.IsSystemReady, () => SuitUp());
}
Logger.Log($"Made spawnpoint on [{planetGO.name}]");
NHLogger.Log($"Made spawnpoint on [{planetGO.name}]");
return playerSpawn;
}

View File

@ -1,11 +1,12 @@
using NewHorizons.Components.Orbital;
using NewHorizons.External;
using NewHorizons.External.Configs;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System.Linq;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Orbital
{
public static class FocalPointBuilder
@ -39,7 +40,7 @@ namespace NewHorizons.Builder.Orbital
if (primary == null || secondary == null)
{
Logger.LogError($"Couldn't make focal point between [{module.primary} = {primary}] and [{module.secondary} = {secondary}]");
NHLogger.LogError($"Couldn't make focal point between [{module.primary} = {primary}] and [{module.secondary} = {secondary}]");
return;
}
}

View File

@ -1,8 +1,9 @@
using NewHorizons.Components.Orbital;
using NewHorizons.External.Modules;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Orbital
{
public static class InitialMotionBuilder
@ -79,7 +80,7 @@ namespace NewHorizons.Builder.Orbital
}
else
{
Logger.LogError($"No primary gravity or focal point for {primaryBody}");
NHLogger.LogError($"No primary gravity or focal point for {primaryBody}");
}
}
@ -98,7 +99,7 @@ namespace NewHorizons.Builder.Orbital
private static void SetBinaryInitialMotion(AstroObject baryCenter, NHAstroObject primaryBody, NHAstroObject secondaryBody)
{
Logger.LogVerbose($"Setting binary initial motion [{primaryBody.name}] [{secondaryBody.name}]");
NHLogger.LogVerbose($"Setting binary initial motion [{primaryBody.name}] [{secondaryBody.name}]");
var primaryGravity = new Gravity(primaryBody._gravityVolume);
var secondaryGravity = new Gravity(secondaryBody._gravityVolume);
@ -171,7 +172,7 @@ namespace NewHorizons.Builder.Orbital
secondaryInitialMotion._cachedInitVelocity = baryCenterVelocity + secondaryVelocity;
secondaryInitialMotion._isInitVelocityDirty = false;
Logger.LogVerbose($"Binary Initial Motion: {m1}, {m2}, {r1}, {r2}, {primaryVelocity}, {secondaryVelocity}");
NHLogger.LogVerbose($"Binary Initial Motion: {m1}, {m2}, {r1}, {r2}, {primaryVelocity}, {secondaryVelocity}");
}
}
}

View File

@ -1,7 +1,7 @@
using NewHorizons.Components.Orbital;
using NewHorizons.External.Configs;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using UnityEngine;
namespace NewHorizons.Builder.Orbital
{

View File

@ -2,15 +2,14 @@ using NewHorizons.Builder.Body;
using NewHorizons.External.Configs;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using static NewHorizons.External.Modules.BrambleModule;
using static NewHorizons.External.Modules.SignalModule;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -56,12 +55,12 @@ namespace NewHorizons.Builder.Props
public static void FinishPairingNodesForDimension(string dimensionName, AstroObject dimensionAO = null)
{
Logger.LogVerbose($"Pairing missed for {dimensionName}");
NHLogger.LogVerbose($"Pairing missed for {dimensionName}");
if (!_unpairedNodes.ContainsKey(dimensionName)) return;
foreach (var nodeWarpController in _unpairedNodes[dimensionName])
{
Logger.LogVerbose($"Pairing node {nodeWarpController.gameObject.name} links to {dimensionName}");
NHLogger.LogVerbose($"Pairing node {nodeWarpController.gameObject.name} links to {dimensionName}");
PairEntrance(nodeWarpController, dimensionName, dimensionAO);
}
@ -72,7 +71,7 @@ namespace NewHorizons.Builder.Props
{
if (!_unpairedNodes.ContainsKey(linksTo)) _unpairedNodes[linksTo] = new();
Logger.LogVerbose($"Recording node {warpVolume.gameObject.name} links to {linksTo}");
NHLogger.LogVerbose($"Recording node {warpVolume.gameObject.name} links to {linksTo}");
_unpairedNodes[linksTo].Add(warpVolume);
}
@ -149,18 +148,18 @@ namespace NewHorizons.Builder.Props
// Returns ture or false depending on if it succeeds
private static bool PairEntrance(InnerFogWarpVolume nodeWarp, string destinationName, AstroObject dimensionAO = null)
{
Logger.LogVerbose($"Pairing node {nodeWarp.gameObject.name} to {destinationName}");
NHLogger.LogVerbose($"Pairing node {nodeWarp.gameObject.name} to {destinationName}");
var destinationAO = dimensionAO ?? AstroObjectLocator.GetAstroObject(destinationName);
if (destinationAO == null) return false;
Logger.LogVerbose($"Found {destinationName} as gameobject {destinationAO.gameObject.name} (was passed in: {dimensionAO != null})");
NHLogger.LogVerbose($"Found {destinationName} as gameobject {destinationAO.gameObject.name} (was passed in: {dimensionAO != null})");
// link the node's warp volume to the destination's
var destination = GetOuterFogWarpVolumeFromAstroObject(destinationAO.gameObject);
if (destination == null) return false;
Logger.LogVerbose($"Proceeding with pairing node {nodeWarp.gameObject.name} to {destinationName}. Path to outer fog warp volume: {destination.transform.GetPath()}");
NHLogger.LogVerbose($"Proceeding with pairing node {nodeWarp.gameObject.name} to {destinationName}. Path to outer fog warp volume: {destination.transform.GetPath()}");
nodeWarp._linkedOuterWarpVolume = destination;
destination.RegisterSenderWarp(nodeWarp);

View File

@ -3,14 +3,15 @@ using NewHorizons.Components;
using NewHorizons.External.Modules.Props;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.SceneManagement;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -70,7 +71,7 @@ namespace NewHorizons.Builder.Props
var prefab = SearchUtilities.Find(info.path);
if (prefab == null)
{
Logger.LogError($"Couldn't find detail {info.path}");
NHLogger.LogError($"Couldn't find detail {info.path}");
return null;
}
else
@ -137,7 +138,7 @@ namespace NewHorizons.Builder.Props
{
if (t.GetComponents<Component>().Any(c => c == null))
{
Logger.LogError($"Failed to instantiate component at {t.GetPath()}. This usually means there's a missing script.");
NHLogger.LogError($"Failed to instantiate component at {t.GetPath()}. This usually means there's a missing script.");
}
}
}
@ -163,7 +164,7 @@ namespace NewHorizons.Builder.Props
childObj.gameObject.SetActive(false);
}
if (flag) Logger.LogWarning($"Couldn't find \"{childPath}\".");
if (flag) NHLogger.LogWarning($"Couldn't find \"{childPath}\".");
}
}
@ -324,7 +325,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception e)
{
Logger.LogError($"Couldn't update AnglerFish chase speed:\n{e}");
NHLogger.LogError($"Couldn't update AnglerFish chase speed:\n{e}");
}
}
@ -376,7 +377,7 @@ namespace NewHorizons.Builder.Props
{
var angler = GetComponent<AnglerfishAnimController>();
Logger.LogVerbose("Fixing anglerfish animation");
NHLogger.LogVerbose("Fixing anglerfish animation");
// Remove any event reference to its angler
if (angler._anglerfishController)

View File

@ -2,12 +2,12 @@ using NewHorizons.Components;
using NewHorizons.External.Modules.Props.Dialogue;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System.IO;
using System.Xml;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -132,7 +132,7 @@ namespace NewHorizons.Builder.Props
if (character == null)
{
Logger.LogError($"Couldn't find child of {go.transform.GetPath()} at {info.pathToAnimController}");
NHLogger.LogError($"Couldn't find child of {go.transform.GetPath()} at {info.pathToAnimController}");
return;
}

View File

@ -1,8 +1,9 @@
using NewHorizons.External.Modules;
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.Utility;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -28,7 +29,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Cannot find parent body named {solarSystemInfo.parentBody}");
NHLogger.LogError($"Cannot find parent body named {solarSystemInfo.parentBody}");
}
}
@ -49,7 +50,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Cannot find parent object at path: {planetGO.name}/{parentPath}");
NHLogger.LogError($"Cannot find parent object at path: {planetGO.name}/{parentPath}");
}
}

View File

@ -1,6 +1,6 @@
using NewHorizons.External.Modules.Props;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using UnityEngine;
namespace NewHorizons.Builder.Props

View File

@ -2,7 +2,7 @@ using NewHorizons.External.Modules.Props;
using NewHorizons.External.Modules.TranslatorText;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using OWML.Common;
using OWML.Utils;
using System;
@ -11,7 +11,7 @@ using System.IO;
using System.Linq;
using System.Xml;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using Random = UnityEngine.Random;
namespace NewHorizons.Builder.Props
@ -45,7 +45,7 @@ namespace NewHorizons.Builder.Props
public static GameObject GetSpawnedGameObjectByNomaiTextInfo(NomaiTextInfo convo)
{
Logger.LogVerbose("Retrieving wall text obj for " + convo);
NHLogger.LogVerbose("Retrieving wall text obj for " + convo);
if (!conversationInfoToCorrespondingSpawnedGameObject.ContainsKey(convo)) return null;
return conversationInfoToCorrespondingSpawnedGameObject[convo];
}
@ -172,7 +172,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
NHLogger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
}
}
@ -268,7 +268,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
NHLogger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
}
}
@ -293,7 +293,7 @@ namespace NewHorizons.Builder.Props
() => Main.IsSystemReady,
() =>
{
Logger.LogVerbose("Fixing scroll!");
NHLogger.LogVerbose("Fixing scroll!");
scrollItem._nomaiWallText = nomaiWallText;
scrollItem.SetSector(sector);
customScroll.transform.Find("Props_NOM_Scroll/Props_NOM_Scroll_Geo").GetComponent<MeshRenderer>().enabled = true;
@ -330,7 +330,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
NHLogger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
}
}
@ -427,7 +427,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
NHLogger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
}
}
@ -529,7 +529,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
NHLogger.LogError($"Cannot find parent object at path: {planetGO.name}/{info.parentPath}");
}
}
@ -572,7 +572,7 @@ namespace NewHorizons.Builder.Props
return trailmarkerObject;
}
default:
Logger.LogError($"Unsupported NomaiText type {info.type}");
NHLogger.LogError($"Unsupported NomaiText type {info.type}");
return null;
}
}
@ -632,7 +632,7 @@ namespace NewHorizons.Builder.Props
if (info.arcInfo != null && info.arcInfo.Count() != dict.Values.Count())
{
Logger.LogError($"Can't make NomaiWallText, arcInfo length [{info.arcInfo.Count()}] doesn't equal text entries [{dict.Values.Count()}]");
NHLogger.LogError($"Can't make NomaiWallText, arcInfo length [{info.arcInfo.Count()}] doesn't equal text entries [{dict.Values.Count()}]");
return;
}
@ -743,13 +743,13 @@ namespace NewHorizons.Builder.Props
if (entryIDNode != null && !int.TryParse(entryIDNode.InnerText, out textEntryID))
{
Logger.LogError($"Couldn't parse int ID in [{entryIDNode?.InnerText}] for [{xmlPath}]");
NHLogger.LogError($"Couldn't parse int ID in [{entryIDNode?.InnerText}] for [{xmlPath}]");
textEntryID = -1;
}
if (parentIDNode != null && !int.TryParse(parentIDNode.InnerText, out parentID))
{
Logger.LogError($"Couldn't parse int ParentID in [{parentIDNode?.InnerText}] for [{xmlPath}]");
NHLogger.LogError($"Couldn't parse int ParentID in [{parentIDNode?.InnerText}] for [{xmlPath}]");
parentID = -1;
}

View File

@ -2,13 +2,14 @@ using NewHorizons.External.Modules.Props;
using NewHorizons.External.Modules.Props.EchoesOfTheEye;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -32,7 +33,7 @@ namespace NewHorizons.Builder.Props
{
_slideReelPrefab = SearchUtilities.Find("RingWorld_Body/Sector_RingInterior/Sector_Zone1/Sector_SlideBurningRoom_Zone1/Interactables_SlideBurningRoom_Zone1/Prefab_IP_SecretAlcove/RotationPivot/SlideReelSocket/Prefab_IP_Reel_1_LibraryPath")?.gameObject?.InstantiateInactive()?.Rename("Prefab_IP_Reel")?.DontDestroyOnLoad();
if (_slideReelPrefab == null)
Logger.LogWarning($"Tried to make slide reel prefab but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make slide reel prefab but couldn't. Do you have the DLC installed?");
else
_slideReelPrefab.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
}
@ -41,7 +42,7 @@ namespace NewHorizons.Builder.Props
{
_autoPrefab = SearchUtilities.Find("RingWorld_Body/Sector_RingInterior/Sector_Zone4/Sector_BlightedShore/Sector_JammingControlRoom_Zone4/Interactables_JammingControlRoom_Zone4/AutoProjector_SignalJammer/Prefab_IP_AutoProjector_SignalJammer")?.gameObject?.InstantiateInactive()?.Rename("Prefab_IP_AutoProjector")?.DontDestroyOnLoad();
if (_autoPrefab == null)
Logger.LogWarning($"Tried to make auto projector prefab but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make auto projector prefab but couldn't. Do you have the DLC installed?");
else
_autoPrefab.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
}
@ -50,7 +51,7 @@ namespace NewHorizons.Builder.Props
{
_visionTorchDetectorPrefab = SearchUtilities.Find("DreamWorld_Body/Sector_DreamWorld/Sector_Underground/Sector_PrisonCell/Ghosts_PrisonCell/GhostDirector_Prisoner/Prefab_IP_GhostBird_Prisoner/Ghostbird_IP_ANIM/Ghostbird_Skin_01:Ghostbird_Rig_V01:Base/Ghostbird_Skin_01:Ghostbird_Rig_V01:Root/Ghostbird_Skin_01:Ghostbird_Rig_V01:Spine01/Ghostbird_Skin_01:Ghostbird_Rig_V01:Spine02/Ghostbird_Skin_01:Ghostbird_Rig_V01:Spine03/Ghostbird_Skin_01:Ghostbird_Rig_V01:Spine04/Ghostbird_Skin_01:Ghostbird_Rig_V01:Neck01/Ghostbird_Skin_01:Ghostbird_Rig_V01:Neck02/Ghostbird_Skin_01:Ghostbird_Rig_V01:Head/PrisonerHeadDetector")?.gameObject?.InstantiateInactive()?.Rename("Prefab_IP_VisionTorchDetector")?.DontDestroyOnLoad();
if (_visionTorchDetectorPrefab == null)
Logger.LogWarning($"Tried to make vision torch detector prefab but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make vision torch detector prefab but couldn't. Do you have the DLC installed?");
else
_visionTorchDetectorPrefab.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
}
@ -59,7 +60,7 @@ namespace NewHorizons.Builder.Props
{
_standingVisionTorchPrefab = SearchUtilities.Find("RingWorld_Body/Sector_RingWorld/Sector_SecretEntrance/Interactibles_SecretEntrance/Experiment_1/VisionTorchApparatus/VisionTorchRoot/Prefab_IP_VisionTorchProjector")?.gameObject?.InstantiateInactive()?.Rename("Prefab_IP_VisionTorchProjector")?.DontDestroyOnLoad();
if (_standingVisionTorchPrefab == null)
Logger.LogWarning($"Tried to make standing vision torch prefab but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make standing vision torch prefab but couldn't. Do you have the DLC installed?");
else
_standingVisionTorchPrefab.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
}
@ -82,7 +83,7 @@ namespace NewHorizons.Builder.Props
MakeStandingVisionTorch(go, sector, info, mod);
break;
default:
Logger.LogError($"Invalid projection type {info.type}");
NHLogger.LogError($"Invalid projection type {info.type}");
break;
}
}
@ -206,7 +207,7 @@ namespace NewHorizons.Builder.Props
if (g == null)
{
Logger.LogWarning($"Tried to make a vision torch target but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make a vision torch target but couldn't. Do you have the DLC installed?");
return null;
}
@ -243,7 +244,7 @@ namespace NewHorizons.Builder.Props
if (standingTorch == null)
{
Logger.LogWarning($"Tried to make a vision torch target but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make a vision torch target but couldn't. Do you have the DLC installed?");
return null;
}

View File

@ -1,13 +1,14 @@
using NewHorizons.Builder.Body;
using NewHorizons.Builder.Props.TranslatorText;
using NewHorizons.Builder.ShipLog;
using NewHorizons.External;
using NewHorizons.External.Configs;
using NewHorizons.Utility;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using System.Collections.Generic;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
public static class PropBuildManager
@ -25,7 +26,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make planet scatter for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make planet scatter for [{go.name}]:\n{ex}");
}
}
if (config.Props.details != null)
@ -38,7 +39,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make planet detail [{detail.path}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make planet detail [{detail.path}] for [{go.name}]:\n{ex}");
}
}
}
@ -52,7 +53,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make geyser for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make geyser for [{go.name}]:\n{ex}");
}
}
}
@ -66,7 +67,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make raft for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make raft for [{go.name}]:\n{ex}");
}
}
}
@ -80,7 +81,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make tornado for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make tornado for [{go.name}]:\n{ex}");
}
}
}
@ -94,7 +95,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make volcano for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make volcano for [{go.name}]:\n{ex}");
}
}
}
@ -109,7 +110,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make dialogue [{dialogueInfo.xmlFile}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make dialogue [{dialogueInfo.xmlFile}] for [{go.name}]:\n{ex}");
}
}
}
@ -123,7 +124,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make entry location [{entryLocationInfo.id}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make entry location [{entryLocationInfo.id}] for [{go.name}]:\n{ex}");
}
}
}
@ -139,7 +140,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make text [{nomaiTextInfo.xmlFile}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make text [{nomaiTextInfo.xmlFile}] for [{go.name}]:\n{ex}");
}
}
@ -155,7 +156,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make text [{nomaiTextInfo.xmlFile}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make text [{nomaiTextInfo.xmlFile}] for [{go.name}]:\n{ex}");
}
}
@ -170,7 +171,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make slide reel for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make slide reel for [{go.name}]:\n{ex}");
}
}
}
@ -197,7 +198,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make quantum group \"{quantumGroup.id}\" for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make quantum group \"{quantumGroup.id}\" for [{go.name}]:\n{ex}");
}
}
}
@ -211,7 +212,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make singularity \"{(string.IsNullOrEmpty(singularity.uniqueID) ? config.name : singularity.uniqueID)}\" for [{go.name}]::\n{ex}");
NHLogger.LogError($"Couldn't make singularity \"{(string.IsNullOrEmpty(singularity.uniqueID) ? config.name : singularity.uniqueID)}\" for [{go.name}]::\n{ex}");
}
}
}
@ -232,7 +233,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make remote [{remoteInfo.id}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make remote [{remoteInfo.id}] for [{go.name}]:\n{ex}");
}
}
}
@ -246,7 +247,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make warp receiver [{warpReceiver.frequency}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make warp receiver [{warpReceiver.frequency}] for [{go.name}]:\n{ex}");
}
}
}
@ -260,7 +261,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make warp transmitter [{warpTransmitter.frequency}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make warp transmitter [{warpTransmitter.frequency}] for [{go.name}]:\n{ex}");
}
}
}

View File

@ -2,12 +2,12 @@ using NewHorizons.Components.Quantum;
using NewHorizons.External.Configs;
using NewHorizons.External.Modules.Props.Quantum;
using NewHorizons.Utility.Geometry;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
// BUGS THAT REQUIRE REWRITING MOBIUS CODE
// 1) FIXED! - MultiStateQuantumObjects don't check to see if the new state would be visible before choosing it
@ -208,7 +208,7 @@ namespace NewHorizons.Builder.Props
void Update()
{
if (meshFilter == null && skinnedMeshRenderer == null) { Logger.LogVerbose("Useless BoxShapeFixer, destroying"); GameObject.DestroyImmediate(this); }
if (meshFilter == null && skinnedMeshRenderer == null) { NHLogger.LogVerbose("Useless BoxShapeFixer, destroying"); GameObject.DestroyImmediate(this); }
Mesh sharedMesh = null;
if (meshFilter != null) sharedMesh = meshFilter.sharedMesh;

View File

@ -1,8 +1,9 @@
using NewHorizons.External.Modules.Props.EchoesOfTheEye;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWML;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
public static class RaftBuilder
@ -16,7 +17,7 @@ namespace NewHorizons.Builder.Props
_prefab = GameObject.FindObjectOfType<RaftController>()?.gameObject?.InstantiateInactive()?.Rename("Raft_Body_Prefab")?.DontDestroyOnLoad();
if (_prefab == null)
{
Logger.LogWarning($"Tried to make a raft but couldn't. Do you have the DLC installed?");
NHLogger.LogWarning($"Tried to make a raft but couldn't. Do you have the DLC installed?");
return;
}
else

View File

@ -1,14 +1,17 @@
using NewHorizons.Builder.Props.TranslatorText;
using NewHorizons.External;
using NewHorizons.External.Modules.Props;
using NewHorizons.External.Modules.Props.Remote;
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.External.Modules.TranslatorText;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -128,7 +131,7 @@ namespace NewHorizons.Builder.Props
Texture2D decal = Texture2D.whiteTexture;
if (!string.IsNullOrWhiteSpace(info.decalPath)) decal = ImageUtilities.GetTexture(mod, info.decalPath, false, false);
else Logger.LogError($"Missing decal path on [{info.id}] for [{go.name}]");
else NHLogger.LogError($"Missing decal path on [{info.id}] for [{go.name}]");
if (info.platform != null)
{
@ -138,7 +141,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make remote platform [{info.id}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make remote platform [{info.id}] for [{go.name}]:\n{ex}");
}
}
@ -150,7 +153,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make remote whiteboard [{info.id}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make remote whiteboard [{info.id}] for [{go.name}]:\n{ex}");
}
}
@ -164,7 +167,7 @@ namespace NewHorizons.Builder.Props
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make remote stone [{info.id}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make remote stone [{info.id}] for [{go.name}]:\n{ex}");
}
}
}

View File

@ -1,8 +1,9 @@
using NewHorizons.External.Configs;
using NewHorizons.External.Modules.Props;
using NewHorizons.Utility;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.Geometry;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using System.Collections.Generic;

View File

@ -1,12 +1,13 @@
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using NewHorizons.Utility.OuterWilds;
using OWML.Common;
using OWML.Utils;
using System.Collections.Generic;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -27,7 +28,7 @@ namespace NewHorizons.Builder.Props
public static void Init()
{
Logger.LogVerbose($"Initializing SignalBuilder");
NHLogger.LogVerbose($"Initializing SignalBuilder");
_customSignalNames = new Dictionary<SignalName, string>();
_customFrequencyNames = new Dictionary<SignalFrequency, string>() {
{ SignalFrequency.Statue, "FREQ_STATUE" },
@ -59,11 +60,11 @@ namespace NewHorizons.Builder.Props
var freq = CollectionUtilities.KeyByValue(_customFrequencyNames, str);
if (freq != default) return freq;
Logger.Log($"Registering new frequency name [{str}]");
NHLogger.Log($"Registering new frequency name [{str}]");
if (NumberOfFrequencies == 31)
{
Logger.LogWarning($"Can't store any more frequencies, skipping [{str}]");
NHLogger.LogWarning($"Can't store any more frequencies, skipping [{str}]");
return SignalFrequency.Default;
}
@ -93,7 +94,7 @@ namespace NewHorizons.Builder.Props
var name = CollectionUtilities.KeyByValue(_customSignalNames, str);
if (name != default) return name;
Logger.Log($"Registering new signal name [{str}]");
NHLogger.Log($"Registering new signal name [{str}]");
name = EnumUtilities.Create<SignalName>(str);
_customSignalNames.Add(name, str);

View File

@ -2,9 +2,10 @@ using NewHorizons.Components;
using NewHorizons.External.Modules.Props;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using Random = UnityEngine.Random;
namespace NewHorizons.Builder.Props
{
@ -88,7 +89,7 @@ namespace NewHorizons.Builder.Props
}
else
{
Logger.LogError($"Need either a position or an elevation for tornados");
NHLogger.LogError($"Need either a position or an elevation for tornados");
return;
}

View File

@ -1,8 +1,8 @@
using NewHorizons.Utility.Geometry;
using NewHorizons.Utility.OWML;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props.TranslatorText
{
@ -149,7 +149,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
// if we couldn't put it inside the bounds, put it back how we found it (this increases stability of the rest of the spirals)
if (s1.Mirrored != originalMirror) s1.Mirror();
s1.PlaceOnParentPoint(start);
Logger.LogVerbose("Unable to place spiral " + s1.gameObject.name + " within bounds.");
NHLogger.LogVerbose("Unable to place spiral " + s1.gameObject.name + " within bounds.");
}
}

View File

@ -1,9 +1,11 @@
using NewHorizons.External;
using NewHorizons.External.Modules.Props;
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.External.Modules.TranslatorText;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.Geometry;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using Newtonsoft.Json;
using OWML.Utils;
using System;
@ -12,7 +14,7 @@ using System.IO;
using System.Linq;
using System.Xml;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using Random = UnityEngine.Random;
namespace NewHorizons.Builder.Props.TranslatorText
@ -42,7 +44,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
public static GameObject GetSpawnedGameObjectByTranslatorTextInfo(TranslatorTextInfo convo)
{
Logger.LogVerbose("Retrieving wall text obj for " + convo);
NHLogger.LogVerbose("Retrieving wall text obj for " + convo);
if (!conversationInfoToCorrespondingSpawnedGameObject.ContainsKey(convo)) return null;
return conversationInfoToCorrespondingSpawnedGameObject[convo];
}
@ -125,7 +127,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
if (xmlContent == null && info.type != NomaiTextType.Whiteboard)
{
Logger.LogError($"Failed to create translator text because {nameof(info.xmlFile)} was not set to a valid text .xml file path");
NHLogger.LogError($"Failed to create translator text because {nameof(info.xmlFile)} was not set to a valid text .xml file path");
return null;
}
@ -190,7 +192,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
Delay.FireOnNextUpdate(
() =>
{
Logger.LogVerbose("Fixing scroll!");
NHLogger.LogVerbose("Fixing scroll!");
scrollItem._nomaiWallText = nomaiWallText;
scrollItem.SetSector(sector);
customScroll.transform.Find("Props_NOM_Scroll/Props_NOM_Scroll_Geo").GetComponent<MeshRenderer>().enabled = true;
@ -387,7 +389,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
return whiteboardObject;
}
default:
Logger.LogError($"Unsupported NomaiText type {info.type}");
NHLogger.LogError($"Unsupported NomaiText type {info.type}");
return null;
}
}
@ -458,7 +460,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
if (info.arcInfo != null && info.arcInfo.Count() != dict.Values.Count())
{
Logger.LogError($"Can't make NomaiWallText, arcInfo length [{info.arcInfo.Count()}] doesn't equal text entries [{dict.Values.Count()}]");
NHLogger.LogError($"Can't make NomaiWallText, arcInfo length [{info.arcInfo.Count()}] doesn't equal text entries [{dict.Values.Count()}]");
return;
}
@ -501,7 +503,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
// no need to arrange if the cache exists
if (cachedData == null)
{
Logger.LogVerbose("Cache and/or cache entry was null, proceding with wall text arc arrangment.");
NHLogger.LogVerbose("Cache and/or cache entry was null, proceding with wall text arc arrangment.");
// auto placement
@ -513,7 +515,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
for(var a = 0; a < 10; a++) arranger.FDGSimulationStep();
}
if (overlapFound) Logger.LogVerbose("Overlap resolution failed!");
if (overlapFound) NHLogger.LogVerbose("Overlap resolution failed!");
// manual placement
@ -628,13 +630,13 @@ namespace NewHorizons.Builder.Props.TranslatorText
if (entryIDNode != null && !int.TryParse(entryIDNode.InnerText, out textEntryID))
{
Logger.LogError($"Couldn't parse int ID in [{entryIDNode?.InnerText}] for [{xmlPath}]");
NHLogger.LogError($"Couldn't parse int ID in [{entryIDNode?.InnerText}] for [{xmlPath}]");
textEntryID = -1;
}
if (parentIDNode != null && !int.TryParse(parentIDNode.InnerText, out parentID))
{
Logger.LogError($"Couldn't parse int ParentID in [{parentIDNode?.InnerText}] for [{xmlPath}]");
NHLogger.LogError($"Couldn't parse int ParentID in [{parentIDNode?.InnerText}] for [{xmlPath}]");
parentID = -1;
}

View File

@ -1,6 +1,6 @@
using NewHorizons.External.Modules.Props;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using UnityEngine;
namespace NewHorizons.Builder.Props

View File

@ -2,10 +2,10 @@ using NewHorizons.Builder.Props.TranslatorText;
using NewHorizons.External.Modules.Props;
using NewHorizons.External.Modules.WarpPad;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using OWML.Utils;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Props
{
@ -88,7 +88,7 @@ namespace NewHorizons.Builder.Props
var detailInfo = new DetailInfo(info);
var receiverObject = DetailBuilder.Make(planetGO, sector, info.detailed ? _detailedReceiverPrefab : _receiverPrefab, detailInfo);
Logger.Log($"Position is {detailInfo.position} was {info.position}");
NHLogger.Log($"Position is {detailInfo.position} was {info.position}");
var receiver = receiverObject.GetComponentInChildren<NomaiWarpReceiver>();

View File

@ -1,15 +1,17 @@
using NewHorizons.Components.ShipLog;
using NewHorizons.External;
using NewHorizons.External.Modules;
using NewHorizons.External.Modules.VariableSize;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using System;
using System.Collections.Generic;
using System.Linq;
using NewHorizons.External.Modules.VariableSize;
using UnityEngine;
using UnityEngine.UI;
using Logger = NewHorizons.Utility.Logger;
using NewHorizons.Components.ShipLog;
using NewHorizons.Utility.OWUtilities;
namespace NewHorizons.Builder.ShipLog
{
@ -37,7 +39,7 @@ namespace NewHorizons.Builder.ShipLog
flagManualPositionUsed = true;
if (body.Config.ShipLog?.mapMode?.manualNavigationPosition == null)
{
Logger.LogError("Navigation position is missing for: " + body.Config.name);
NHLogger.LogError("Navigation position is missing for: " + body.Config.name);
return null;
}
}
@ -46,7 +48,7 @@ namespace NewHorizons.Builder.ShipLog
if (flagManualPositionUsed)
{
if (flagAutoPositionUsed && flagManualPositionUsed)
Logger.LogWarning("Can't mix manual and automatic layout of ship log map mode, defaulting to manual");
NHLogger.LogWarning("Can't mix manual and automatic layout of ship log map mode, defaulting to manual");
return ConstructMapModeManual(bodies, transformParent, greyScaleMaterial, currentNav, layer);
}
else if (flagAutoPositionUsed)
@ -101,7 +103,7 @@ namespace NewHorizons.Builder.ShipLog
{
const float unviewedIconOffset = 15;
Logger.LogVerbose($"Adding ship log astro object for {body.Config.name}");
NHLogger.LogVerbose($"Adding ship log astro object for {body.Config.name}");
GameObject unviewedReference = SearchUtilities.Find(ShipLogHandler.PAN_ROOT_PATH + "/TimberHearth/UnviewedIcon");
@ -148,9 +150,9 @@ namespace NewHorizons.Builder.ShipLog
detailGameObject.SetActive(false);
RectTransform detailTransform = detailGameObject.AddComponent<RectTransform>();
detailTransform.localPosition = (Vector2)(info.position ?? new MVector2(0, 0));
detailTransform.localPosition = (Vector2)(info.position ?? Vector2.zero);
detailTransform.localRotation = Quaternion.Euler(0f, 0f, info.rotation);
detailTransform.localScale = (Vector2)(info.scale ?? new MVector2(0, 0));
detailTransform.localScale = (Vector2)(info.scale ?? Vector2.zero);
Texture2D image;
Texture2D outline;
@ -387,7 +389,7 @@ namespace NewHorizons.Builder.ShipLog
newNode.children = ConstructChildrenNodes(newNode, bodies);
return newNode;
}
Logger.LogError("Couldn't find center of system!");
NHLogger.LogError("Couldn't find center of system!");
return new MapModeObject();
}
@ -561,7 +563,7 @@ namespace NewHorizons.Builder.ShipLog
}
catch (Exception)
{
Logger.LogWarning($"Something went wrong trying to pick the colour for {body.Config.name} but I'm too lazy to fix it.");
NHLogger.LogWarning($"Something went wrong trying to pick the colour for {body.Config.name} but I'm too lazy to fix it.");
}
return Color.white;

View File

@ -1,10 +1,11 @@
using NewHorizons.Builder.Props;
using NewHorizons.Components.Achievement;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using OWML.Common;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.ShipLog
{
public static class RevealBuilder
@ -24,7 +25,7 @@ namespace NewHorizons.Builder.ShipLog
MakeSnapshot(newRevealGO, sector, info, mod);
break;
default:
Logger.LogError("Invalid revealOn: " + info.revealOn);
NHLogger.LogError("Invalid revealOn: " + info.revealOn);
break;
}
newRevealGO.SetActive(true);

View File

@ -1,15 +1,16 @@
using NewHorizons.External;
using NewHorizons.External.Configs;
using NewHorizons.External.Modules;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using OWML.Utils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Linq;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.ShipLog
{
public static class RumorModeBuilder
@ -57,7 +58,7 @@ namespace NewHorizons.Builder.ShipLog
XElement astroBodyId = astroBodyFile.Element("ID");
if (astroBodyId == null)
{
Logger.LogError("Failed to load ship logs for " + systemName + "!");
NHLogger.LogError("Failed to load ship logs for " + systemName + "!");
}
else
{
@ -198,7 +199,7 @@ namespace NewHorizons.Builder.ShipLog
}
else
{
Logger.LogError($"Couldn't find {raw}. Did you define the curiosity in a json config? Because you have to.");
NHLogger.LogError($"Couldn't find {raw}. Did you define the curiosity in a json config? Because you have to.");
}
}
}
@ -215,7 +216,7 @@ namespace NewHorizons.Builder.ShipLog
}
catch (Exception)
{
if (logError) Logger.LogError($"Couldn't load image for {entryId} at {relativePath}");
if (logError) NHLogger.LogError($"Couldn't load image for {entryId} at {relativePath}");
return null;
}
}

View File

@ -1,10 +1,11 @@
using NewHorizons.External.Configs;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using NewHorizons.Utility.OuterWilds;
using OWML.Common;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.StarSystem
{
@ -14,7 +15,7 @@ namespace NewHorizons.Builder.StarSystem
public static void Make(StarSystemConfig.SkyboxModule module, IModBehaviour mod)
{
Logger.Log("Building Skybox");
NHLogger.Log("Building Skybox");
BuildSkySphere(module, mod);
}
@ -50,7 +51,7 @@ namespace NewHorizons.Builder.StarSystem
{
if (!tex)
{
Logger.LogError($"Failed to load texture for skybox {name.ToLower()} face");
NHLogger.LogError($"Failed to load texture for skybox {name.ToLower()} face");
return null;
}

View File

@ -1,7 +1,7 @@
using NewHorizons.Builder.Props;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using NewHorizons.Utility;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OuterWilds;
using OWML.Common;
using OWML.Utils;
using UnityEngine;

View File

@ -1,6 +1,6 @@
using NewHorizons.Builder.Props;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using OWML.Common;
using OWML.Utils;
using System.Linq;

View File

@ -1,6 +1,6 @@
using NewHorizons.Builder.Props;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using OWML.Common;
using UnityEngine;
using NHNotificationVolume = NewHorizons.Components.Volumes.NotificationVolume;

View File

@ -1,5 +1,4 @@
using NewHorizons.External.Modules.Volumes;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using UnityEngine;
namespace NewHorizons.Builder.Volumes.Rulesets

View File

@ -1,5 +1,4 @@
using NewHorizons.External.Modules.Volumes;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using UnityEngine;
namespace NewHorizons.Builder.Volumes.Rulesets

View File

@ -1,5 +1,4 @@
using NewHorizons.External.Modules.Volumes;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using UnityEngine;
namespace NewHorizons.Builder.Volumes.Rulesets

View File

@ -1,6 +1,6 @@
using NewHorizons.Builder.Props;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using UnityEngine;
namespace NewHorizons.Builder.Volumes

View File

@ -1,5 +1,4 @@
using NewHorizons.External.Modules.Volumes;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using UnityEngine;
namespace NewHorizons.Builder.Volumes.VisorEffects

View File

@ -1,5 +1,4 @@
using NewHorizons.External.Modules.Volumes;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using UnityEngine;
namespace NewHorizons.Builder.Volumes.VisorEffects

View File

@ -1,6 +1,6 @@
using NewHorizons.Builder.Props;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using UnityEngine;
namespace NewHorizons.Builder.Volumes

View File

@ -3,10 +3,10 @@ using NewHorizons.Builder.Volumes.Rulesets;
using NewHorizons.Builder.Volumes.VisorEffects;
using NewHorizons.Components.Volumes;
using NewHorizons.External.Configs;
using NewHorizons.Utility.OWML;
using OWML.Common;
using System;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Builder.Volumes
{
@ -24,7 +24,7 @@ namespace NewHorizons.Builder.Volumes
}
catch (Exception ex)
{
Logger.LogError($"Couldn't make reveal location [{revealInfo.reveals}] for [{go.name}]:\n{ex}");
NHLogger.LogError($"Couldn't make reveal location [{revealInfo.reveals}] for [{go.name}]:\n{ex}");
}
}
}

View File

@ -1,5 +1,5 @@
using NewHorizons.OtherMods.AchievementsPlus;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using UnityEngine;
namespace NewHorizons.Components.Achievement

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using System.Collections;
using UnityEngine;

View File

@ -1,6 +1,6 @@
using NewHorizons.Components.SizeControllers;
using NewHorizons.Handlers;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

View File

@ -1,6 +1,7 @@
using System;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using NewHorizons.Utility.OWML;
namespace NewHorizons.Components.Orbital
{
public class NHOrbitLine : OrbitLine
@ -85,7 +86,7 @@ namespace NewHorizons.Components.Orbital
}
catch (Exception ex)
{
Logger.LogError($"Exception in OrbitLine for [{_astroObject?.name}]:\n{ex}");
NHLogger.LogError($"Exception in OrbitLine for [{_astroObject?.name}]:\n{ex}");
enabled = false;
}
}

View File

@ -1,6 +1,7 @@
using System;
using System;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using NewHorizons.Utility.OWML;
namespace NewHorizons.Components.Orbital
{
public class TrackingOrbitLine : OrbitLine
@ -85,7 +86,7 @@ namespace NewHorizons.Components.Orbital
}
catch (Exception ex)
{
Logger.LogError($"Exception in OrbitLine for [{_astroObject?.name}]:\n{ex}");
NHLogger.LogError($"Exception in OrbitLine for [{_astroObject?.name}]:\n{ex}");
enabled = false;
}
}

View File

@ -1,8 +1,7 @@
using NewHorizons.Utility.OWML;
using System.Collections.Generic;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Components.Quantum
{
public class NHMultiStateQuantumObject : MultiStateQuantumObject
@ -66,7 +65,7 @@ namespace NewHorizons.Components.Quantum
if (previousIndex >= 0 && previousIndex < _states.Length) _states[previousIndex].SetVisible(visible: false);
_states[_stateIndex].SetVisible(visible: true);
Logger.LogVerbose($"MultiStateQuantumObject - Trying to change state {_stateIndex}");
NHLogger.LogVerbose($"MultiStateQuantumObject - Trying to change state {_stateIndex}");
indices.Remove(_stateIndex);
} while (!CurrentStateIsValid() && indices.Count > 0);

View File

@ -2,12 +2,13 @@ using NewHorizons.Builder.General;
using NewHorizons.Components.Orbital;
using NewHorizons.External.Modules;
using NewHorizons.Handlers;
using NewHorizons.Utility.OWUtilities;
using NewHorizons.Utility.OuterWilds;
using NewHorizons.Utility.OWML;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
using Random = UnityEngine.Random;
namespace NewHorizons.Components.Quantum
{
public class QuantumPlanet : QuantumObject
@ -66,7 +67,7 @@ namespace NewHorizons.Components.Quantum
public override bool ChangeQuantumState(bool skipInstantVisibilityCheck)
{
Logger.LogVerbose($"QuantumPlanet - Trying to change quantum state");
NHLogger.LogVerbose($"QuantumPlanet - Trying to change quantum state");
if (states.Count <= 1) return false;

View File

@ -1,7 +1,8 @@
using NewHorizons.External.Modules;
using NewHorizons.Utility.OWML;
using UnityEngine;
using UnityEngine.UI;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Components.ShipLog
{
public class ShipLogDetail : MonoBehaviour
@ -44,7 +45,7 @@ namespace NewHorizons.Components.ShipLog
_outlineImage.enabled = false;
break;
default:
Logger.LogError("Invalid ShipLogEntryState for " + _revealedImage.transform.parent.parent.gameObject.name);
NHLogger.LogError("Invalid ShipLogEntryState for " + _revealedImage.transform.parent.parent.gameObject.name);
break;
}
}

View File

@ -1,13 +1,14 @@
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Components.ShipLog
{
public class ShipLogStarChartMode : ShipLogMode
@ -134,7 +135,7 @@ namespace NewHorizons.Components.ShipLog
else
{
var path = Path.Combine("planets", uniqueID + ".png");
Logger.LogVerbose($"ShipLogStarChartManager - Trying to load {path}");
NHLogger.LogVerbose($"ShipLogStarChartManager - Trying to load {path}");
texture = ImageUtilities.GetTexture(Main.SystemDict[uniqueID].Mod, path);
}
}

View File

@ -1,8 +1,8 @@
using NewHorizons.Builder.General;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Components
{
public class ShipWarpController : MonoBehaviour
@ -112,7 +112,7 @@ namespace NewHorizons.Components
public void WarpIn(bool wearingSuit)
{
Logger.LogVerbose("Starting warp-in");
NHLogger.LogVerbose("Starting warp-in");
// Trying really hard to stop the player from dying while warping in
_impactDeathSpeed = Locator.GetDeathManager()._impactDeathSpeed;
Locator.GetDeathManager()._impactDeathSpeed = Mathf.Infinity;
@ -125,7 +125,7 @@ namespace NewHorizons.Components
public void WarpOut()
{
Logger.LogVerbose("Starting warp-out");
NHLogger.LogVerbose("Starting warp-out");
_oneShotSource.PlayOneShot(global::AudioType.VesselSingularityCreate, 1f);
_blackhole.Create();
}
@ -142,7 +142,7 @@ namespace NewHorizons.Components
{
if (Locator.GetPlayerTransform().TryGetComponent<PlayerResources>(out var resources) && resources._currentHealth < 100f)
{
Logger.LogVerbose("Player died in a warp drive accident, reviving them");
NHLogger.LogVerbose("Player died in a warp drive accident, reviving them");
// Means the player was killed meaning they weren't teleported in
resources._currentHealth = 100f;
if (!PlayerState.AtFlightConsole()) TeleportToShip();
@ -164,7 +164,7 @@ namespace NewHorizons.Components
private void StartWarpInEffect()
{
Logger.LogVerbose("Starting warp-in effect");
NHLogger.LogVerbose("Starting warp-in effect");
_oneShotSource.PlayOneShot(global::AudioType.VesselSingularityCollapse, 1f);
Locator.GetDeathManager()._invincible = true;
if (Main.Instance.CurrentStarSystem.Equals("SolarSystem")) TeleportToShip();
@ -184,7 +184,7 @@ namespace NewHorizons.Components
public void FinishWarpIn()
{
Logger.LogVerbose("Finishing warp");
NHLogger.LogVerbose("Finishing warp");
Locator.GetShipBody().GetComponentInChildren<ShipCockpitController>().OnPressInteract();
_waitingToBeSeated = false;
Delay.FireInNUpdates(() => _whitehole.Collapse(), 30);

View File

@ -1,5 +1,5 @@
using NewHorizons.Builder.Body;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using UnityEngine;
namespace NewHorizons.Components.SizeControllers

View File

@ -1,15 +1,16 @@
using NewHorizons.Builder.Body;
using NewHorizons.Components.Orbital;
using NewHorizons.Components.Stars;
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.External.Modules.VariableSize;
using NewHorizons.Handlers;
using NewHorizons.Utility;
using NewHorizons.Utility.OWMLUtilities;
using NewHorizons.Utility.OWML;
using System;
using System.Linq;
using UnityEngine;
using UnityEngine.Events;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Components.SizeControllers
{
@ -351,7 +352,7 @@ namespace NewHorizons.Components.SizeControllers
{
if (_isCollapsing) return;
Logger.LogVerbose($"{gameObject.transform.root.name} started collapse");
NHLogger.LogVerbose($"{gameObject.transform.root.name} started collapse");
CollapseStart.Invoke();
_isCollapsing = true;
@ -367,7 +368,7 @@ namespace NewHorizons.Components.SizeControllers
{
if (!_isCollapsing) return;
Logger.LogVerbose($"{gameObject.transform.root.name} stopped collapse");
NHLogger.LogVerbose($"{gameObject.transform.root.name} stopped collapse");
CollapseStop.Invoke();
_isCollapsing = false;
@ -381,7 +382,7 @@ namespace NewHorizons.Components.SizeControllers
if (supernova == null) return;
if (_isSupernova) return;
Logger.LogVerbose($"{gameObject.transform.root.name} started supernova");
NHLogger.LogVerbose($"{gameObject.transform.root.name} started supernova");
SupernovaStart.Invoke();
supernova.Activate();
@ -399,7 +400,7 @@ namespace NewHorizons.Components.SizeControllers
{
if (!_isSupernova) return;
Logger.LogVerbose($"{gameObject.transform.root.name} stopped supernova");
NHLogger.LogVerbose($"{gameObject.transform.root.name} stopped supernova");
SupernovaStop.Invoke();
if (supernova != null) supernova.Deactivate();

View File

@ -1,7 +1,8 @@
using NewHorizons.Builder.Atmosphere;
using NewHorizons.Utility.OWML;
using System.Collections.Generic;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Components.Stars
{
[RequireComponent(typeof(SunLightController))]
@ -42,13 +43,13 @@ namespace NewHorizons.Components.Stars
{
if (star == null) return;
Logger.LogVerbose($"Adding new star to list: {star.gameObject.name}");
NHLogger.LogVerbose($"Adding new star to list: {star.gameObject.name}");
Instance._stars.Add(star);
}
public static void RemoveStar(StarController star)
{
Logger.LogVerbose($"Removing star from list: {star?.gameObject?.name}");
NHLogger.LogVerbose($"Removing star from list: {star?.gameObject?.name}");
if (Instance._stars.Contains(star))
{
if (Instance._activeStar != null && Instance._activeStar.Equals(star))
@ -169,7 +170,7 @@ namespace NewHorizons.Components.Stars
if (_activeStar != null) _activeStar.Disable();
Logger.LogVerbose($"Switching active star: {star.gameObject.name}");
NHLogger.LogVerbose($"Switching active star: {star.gameObject.name}");
_activeStar = star;

View File

@ -1,8 +1,9 @@
using NewHorizons.External.Modules.SerializableEnums;
using NewHorizons.Handlers;
using NewHorizons.Utility.OWML;
using System.Collections;
using UnityEngine;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.Components.Volumes
{
@ -65,7 +66,7 @@ namespace NewHorizons.Components.Volumes
private void LoadCreditsScene()
{
Logger.LogVerbose($"Load credits {creditsType}");
NHLogger.LogVerbose($"Load credits {creditsType}");
switch (creditsType)
{

View File

@ -5,13 +5,13 @@ using NewHorizons.External.Modules.Props.Quantum;
using NewHorizons.External.Modules.VariableSize;
using NewHorizons.External.Modules.Volumes;
using NewHorizons.External.Modules.Volumes.VolumeInfos;
using NewHorizons.Utility.OWML;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Logger = NewHorizons.Utility.Logger;
namespace NewHorizons.External.Configs
{
@ -220,18 +220,18 @@ namespace NewHorizons.External.Configs
Dictionary<string, QuantumGroupInfo> existingGroups = new Dictionary<string, QuantumGroupInfo>();
foreach (var quantumGroup in Props.quantumGroups)
{
if (existingGroups.ContainsKey(quantumGroup.id)) { Logger.LogWarning($"Duplicate quantumGroup id found: {quantumGroup.id}"); quantumGroup.type = QuantumGroupType.FailedValidation; }
if (existingGroups.ContainsKey(quantumGroup.id)) { NHLogger.LogWarning($"Duplicate quantumGroup id found: {quantumGroup.id}"); quantumGroup.type = QuantumGroupType.FailedValidation; }
existingGroups[quantumGroup.id] = quantumGroup;
if (quantumGroup.type == QuantumGroupType.Sockets)
{
if (quantumGroup.sockets?.Length == 0) { Logger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" but has no defined sockets."); quantumGroup.type = QuantumGroupType.FailedValidation; }
if (quantumGroup.sockets?.Length == 0) { NHLogger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" but has no defined sockets."); quantumGroup.type = QuantumGroupType.FailedValidation; }
else
{
foreach (var socket in quantumGroup.sockets)
{
if (socket.rotation == null) socket.rotation = UnityEngine.Vector3.zero;
if (socket.position == null) { Logger.LogError($"quantumGroup {quantumGroup.id} has a socket without a position."); quantumGroup.type = QuantumGroupType.FailedValidation; }
if (socket.position == null) { NHLogger.LogError($"quantumGroup {quantumGroup.id} has a socket without a position."); quantumGroup.type = QuantumGroupType.FailedValidation; }
}
}
}
@ -241,7 +241,7 @@ namespace NewHorizons.External.Configs
foreach (var prop in Props?.details)
{
if (prop.quantumGroupID == null) continue;
if (!existingGroups.ContainsKey(prop.quantumGroupID)) Logger.LogWarning($"A prop wants to be a part of quantum group {prop.quantumGroupID}, but this group does not exist.");
if (!existingGroups.ContainsKey(prop.quantumGroupID)) NHLogger.LogWarning($"A prop wants to be a part of quantum group {prop.quantumGroupID}, but this group does not exist.");
else existingGroupsPropCounts[prop.quantumGroupID] = existingGroupsPropCounts.GetValueOrDefault(prop.quantumGroupID) + 1;
}
@ -249,7 +249,7 @@ namespace NewHorizons.External.Configs
{
if (quantumGroup.type == QuantumGroupType.Sockets && existingGroupsPropCounts.GetValueOrDefault(quantumGroup.id) >= quantumGroup.sockets?.Length)
{
Logger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" and has more props than sockets.");
NHLogger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" and has more props than sockets.");
quantumGroup.type = QuantumGroupType.FailedValidation;
}
}

View File

@ -3,7 +3,7 @@ using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using static NewHorizons.External.Modules.ShipLogModule;

View File

@ -1,6 +1,6 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules

View File

@ -2,8 +2,8 @@ using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.External.Modules.SerializableEnums;
using NewHorizons.Utility;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

View File

@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
using System.Runtime.Serialization;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;

View File

@ -1,5 +1,5 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

View File

@ -1,7 +1,7 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using NewHorizons.Components.Orbital;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules

View File

@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System;
using System.ComponentModel;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System;
using System.ComponentModel;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules.Props.EchoesOfTheEye

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System.ComponentModel;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System.ComponentModel;

View File

@ -1,5 +1,5 @@
using NewHorizons.External.Modules.SerializableData;
using NewHorizons.External.Modules.SerializableEnums;
using NewHorizons.Utility;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System.ComponentModel;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System.ComponentModel;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System.ComponentModel;

View File

@ -1,5 +1,5 @@
using System.ComponentModel;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules

View File

@ -1,6 +1,6 @@
using System;
using System.ComponentModel;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System;

View File

@ -1,6 +1,6 @@
using System.ComponentModel;
using System.Runtime.Serialization;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
namespace NewHorizons.External.Modules.VariableSize

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
namespace NewHorizons.External.Modules.VariableSize
{

View File

@ -2,7 +2,7 @@ using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

View File

@ -1,4 +1,4 @@
using NewHorizons.Utility;
using NewHorizons.External.Modules.SerializableData;
using Newtonsoft.Json;
using System.ComponentModel;

Some files were not shown because too many files have changed in this diff Show More