mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Disable time loop is AWC removed
This commit is contained in:
parent
2ad32409ab
commit
86f889fef8
@ -19,6 +19,8 @@ public static class HeldItemHandler
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private static Dictionary<string, List<string>> _pathOfItemTakenFromSystem = new();
|
private static Dictionary<string, List<string>> _pathOfItemTakenFromSystem = new();
|
||||||
|
|
||||||
|
public static bool WasAWCTakenFromATP => _pathOfItemTakenFromSystem.TryGetValue("SolarSystem", out var list) && list.Contains(ADVANCED_WARP_CORE);
|
||||||
|
|
||||||
private static GameObject _currentlyHeldItem;
|
private static GameObject _currentlyHeldItem;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -43,6 +45,12 @@ public static class HeldItemHandler
|
|||||||
|
|
||||||
_currentStarSystem = Main.Instance.CurrentStarSystem;
|
_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)
|
if (!_isInitialized)
|
||||||
{
|
{
|
||||||
_isInitialized = true;
|
_isInitialized = true;
|
||||||
@ -127,6 +135,7 @@ public static class HeldItemHandler
|
|||||||
{
|
{
|
||||||
foreach (var path in paths)
|
foreach (var path in paths)
|
||||||
{
|
{
|
||||||
|
// Have to wait two frames for the sockets to Awake and Start
|
||||||
Delay.FireInNUpdates(() =>
|
Delay.FireInNUpdates(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user