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

26 lines
622 B
C#
Raw Normal View History

2020-12-20 10:56:15 +00:00
using OWML.Utils;
2020-12-04 22:14:53 +00:00
using QuantumUNET;
namespace QSB.TimeSync
{
2020-12-23 12:58:45 +00:00
public class PreserveTimeScale : QNetworkBehaviour
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
{
2021-09-02 10:25:07 +00:00
// BUG : Get this working for the new menu system. Can't use OWML's anymore.
//QSBCore.Helper.Menus.PauseMenu.GetTitleButton("Button-EndCurrentLoop").Hide(); // Remove the meditation button
2020-12-02 21:29:53 +00:00
// Allow server to sleep at campfires
if (IsServer)
{
return;
}
2020-12-02 21:29:53 +00:00
var campfires = FindObjectsOfType<Campfire>();
foreach (var campfire in campfires)
{
campfire.SetValue("_canSleepHere", false); // Stop players from sleeping at campfires
}
}
}
2020-12-03 08:28:05 +00:00
}