mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-11 00:52:19 +00:00
49fa4d1eeb
* oh my god so many things * i came in and rewrote half the mod, sorry
27 lines
721 B
C#
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
|
|
}
|
|
}
|
|
}
|
|
}
|