quantum-space-buddies/QSB/TimeSync/PreserveTimeScale.cs
Mister_Nebula 49fa4d1eeb
Nebula development (#96)
* oh my god so many things

* i came in and rewrote half the mod, sorry
2020-07-28 00:13:43 +01:00

27 lines
721 B
C#

using OWML.ModHelper.Events;
using UnityEngine;
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 = GameObject.FindObjectsOfType<Campfire>();
foreach (var campfire in campfires)
{
campfire.SetValue("_canSleepHere", false); // Stop players from sleeping at campfires
}
}
}
}