Dont add timeloopcontroller to base system

This commit is contained in:
Nick 2024-03-12 12:57:16 -04:00
parent 0036028404
commit 13b28fa372
2 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,9 @@ namespace NewHorizons.Components
public void Update()
{
// So that mods can turn the time loop on/off using the TimLoop.SetTimeLoopEnabled method
if (!TimeLoop._timeLoopEnabled) return;
// Stock gives like 33 seconds after the sun collapses
if (_supernovaHappened && Time.time > _supernovaTime + 50f)
{

View File

@ -34,7 +34,8 @@ namespace NewHorizons.Handlers
if (Main.Instance.CurrentStarSystem == "EyeOfTheUniverse") return;
// Small mod compat change for StopTime - do nothing if it's enabled
if (system.Config.enableTimeLoop && !OtherModUtil.IsEnabled("_nebula.StopTime"))
// Do not add our custom time loop controller in the base game system: It will handle itself
if (Main.Instance.CurrentStarSystem != "SolarSystem" && system.Config.enableTimeLoop && !OtherModUtil.IsEnabled("_nebula.StopTime"))
{
var timeLoopController = new GameObject("TimeLoopController");
timeLoopController.AddComponent<TimeLoopController>();