mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 21:59:16 +00:00
26 lines
691 B
C#
26 lines
691 B
C#
using OWML.ModHelper.Events;
|
|
using UnityEngine.Networking;
|
|
|
|
namespace QSB.TimeSync
|
|
{
|
|
public class PreserveTimeScale : NetworkBehaviour
|
|
{
|
|
private void Start()
|
|
{
|
|
QSB.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
|
|
}
|
|
}
|
|
}
|
|
}
|