diff --git a/NewHorizons/Handlers/HeldItemHandler.cs b/NewHorizons/Handlers/HeldItemHandler.cs index 4ef2bd82..ef61cd3f 100644 --- a/NewHorizons/Handlers/HeldItemHandler.cs +++ b/NewHorizons/Handlers/HeldItemHandler.cs @@ -19,6 +19,8 @@ public static class HeldItemHandler /// private static Dictionary> _pathOfItemTakenFromSystem = new(); + public static bool WasAWCTakenFromATP => _pathOfItemTakenFromSystem.TryGetValue("SolarSystem", out var list) && list.Contains(ADVANCED_WARP_CORE); + private static GameObject _currentlyHeldItem; /// @@ -43,6 +45,12 @@ public static class HeldItemHandler _currentStarSystem = Main.Instance.CurrentStarSystem; + // If we took the AWC out of the main system make sure to disable time loop + if (_currentStarSystem != "SolarSystem" && WasAWCTakenFromATP) + { + TimeLoop.SetTimeLoopEnabled(false); + } + if (!_isInitialized) { _isInitialized = true; @@ -127,6 +135,7 @@ public static class HeldItemHandler { foreach (var path in paths) { + // Have to wait two frames for the sockets to Awake and Start Delay.FireInNUpdates(() => { try