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

25 lines
554 B
C#
Raw Normal View History

using OWML.ModHelper.Events;
2020-12-04 22:14:53 +00:00
using QuantumUNET;
namespace QSB.TimeSync
{
2020-12-02 21:29:53 +00:00
public class PreserveTimeScale : QSBNetworkBehaviour
{
private void Start()
{
2020-12-14 16:24:52 +00:00
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
}