2022-01-15 06:54:18 +00:00
|
|
|
|
using Mirror;
|
2020-02-18 20:32:26 +00:00
|
|
|
|
|
2020-02-24 18:55:16 +00:00
|
|
|
|
namespace QSB.TimeSync
|
2020-02-18 20:32:26 +00:00
|
|
|
|
{
|
2022-01-15 06:54:18 +00:00
|
|
|
|
public class PreserveTimeScale : NetworkBehaviour
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
2020-12-14 20:41:56 +00: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 08:39:15 +00:00
|
|
|
|
|
2020-12-02 21:29:53 +00:00
|
|
|
|
// Allow server to sleep at campfires
|
2022-01-15 06:54:18 +00:00
|
|
|
|
if (isServer)
|
2020-12-02 21:29:53 +00:00
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2020-02-29 08:39:15 +00:00
|
|
|
|
|
2020-12-02 21:29:53 +00:00
|
|
|
|
var campfires = FindObjectsOfType<Campfire>();
|
|
|
|
|
foreach (var campfire in campfires)
|
|
|
|
|
{
|
2021-12-27 04:57:34 +00: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
|
|
|
|
}
|