quantum-space-buddies/QSB/TimeSync/PreserveTimeScale.cs
2020-12-14 21:41:56 +01:00

25 lines
553 B
C#

using OWML.ModHelper.Events;
using QuantumUNET;
namespace QSB.TimeSync
{
public class PreserveTimeScale : QSBNetworkBehaviour
{
public void Start()
{
QSBCore.Helper.Menus.PauseMenu.GetTitleButton("Button-EndCurrentLoop").Hide(); // Remove the meditation button
// Allow server to sleep at campfires
if (IsServer)
{
return;
}
var campfires = FindObjectsOfType<Campfire>();
foreach (var campfire in campfires)
{
campfire.SetValue("_canSleepHere", false); // Stop players from sleeping at campfires
}
}
}
}