quantum-space-buddies/QSB/TimeSync/PreserveTimeScale.cs

25 lines
507 B
C#
Raw Normal View History

using Mirror;
namespace QSB.TimeSync
{
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-12-02 21:29:53 +00:00
// Allow server to sleep at campfires
if (isServer)
2020-12-02 21:29:53 +00:00
{
return;
}
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
}