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
|
|
|
|
{
|
2020-12-14 21:41:56 +01:00
|
|
|
|
public void Start()
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
2022-01-22 15:45:25 +00:00
|
|
|
|
// disable meditation button;
|
|
|
|
|
Locator.GetSceneMenuManager().pauseMenu._skipToNextLoopButton.SetActive(false);
|
2020-02-29 09:39:15 +01:00
|
|
|
|
|
2020-12-02 21:29:53 +00:00
|
|
|
|
// Allow server to sleep at campfires
|
2022-01-14 22:54:18 -08:00
|
|
|
|
if (isServer)
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2020-02-29 09:39:15 +01:00
|
|
|
|
|
2020-12-02 21:29:53 +00:00
|
|
|
|
var campfires = FindObjectsOfType<Campfire>();
|
|
|
|
|
foreach (var campfire in campfires)
|
|
|
|
|
{
|
2021-12-26 20:57:34 -08:00
|
|
|
|
campfire._canSleepHere = false; // Stop players from sleeping at campfires
|
2020-12-02 21:29:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-03 08:28:05 +00:00
|
|
|
|
}
|