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

25 lines
593 B
C#
Raw Normal View History

2021-12-26 21:05:07 -08: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 21:41:56 +01:00
public void Start()
2020-12-02 21:29:53 +00:00
{
2021-09-02 11:25:07 +01: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)
{
2021-12-26 20:57:34 -08: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
}