2022-01-14 22:54:18 -08:00
|
|
|
|
using Mirror;
|
2020-02-18 21:32:26 +01:00
|
|
|
|
|
2020-02-24 19:55:16 +01:00
|
|
|
|
namespace QSB.TimeSync
|
2020-02-18 21:32:26 +01:00
|
|
|
|
{
|
2022-01-14 22:54:18 -08:00
|
|
|
|
public class PreserveTimeScale : NetworkBehaviour
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
2022-01-23 16:14:42 +00:00
|
|
|
|
public void Init()
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
2022-01-23 17:31:32 +00:00
|
|
|
|
if (!isServer)
|
|
|
|
|
{
|
|
|
|
|
var campfires = FindObjectsOfType<Campfire>();
|
|
|
|
|
foreach (var campfire in campfires)
|
|
|
|
|
{
|
|
|
|
|
campfire._canSleepHere = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var menuManager = Locator.GetSceneMenuManager();
|
2020-02-29 09:39:15 +01:00
|
|
|
|
|
2022-01-23 17:31:32 +00:00
|
|
|
|
if (menuManager == null)
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2020-02-29 09:39:15 +01:00
|
|
|
|
|
2022-01-23 17:31:32 +00:00
|
|
|
|
if (menuManager._pauseMenu == null || menuManager.pauseMenu._skipToNextLoopButton == null)
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
2022-01-23 17:31:32 +00:00
|
|
|
|
return;
|
2020-12-02 21:29:53 +00:00
|
|
|
|
}
|
2022-01-23 17:31:32 +00:00
|
|
|
|
|
|
|
|
|
menuManager.pauseMenu._skipToNextLoopButton.SetActive(false);
|
2020-12-02 21:29:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-03 08:28:05 +00:00
|
|
|
|
}
|