2020-02-28 21:07:39 +00:00
|
|
|
|
using OWML.ModHelper.Events;
|
|
|
|
|
using UnityEngine;
|
2020-02-29 08:39:15 +00:00
|
|
|
|
using UnityEngine.Networking;
|
2020-02-18 20:32:26 +00:00
|
|
|
|
|
2020-02-24 18:55:16 +00:00
|
|
|
|
namespace QSB.TimeSync
|
2020-02-18 20:32:26 +00:00
|
|
|
|
{
|
2020-02-29 08:39:15 +00:00
|
|
|
|
public class PreserveTimeScale : NetworkBehaviour
|
2020-02-18 20:32:26 +00:00
|
|
|
|
{
|
2020-02-28 21:07:39 +00:00
|
|
|
|
private void Start()
|
2020-02-18 20:32:26 +00:00
|
|
|
|
{
|
2020-02-29 08:39:15 +00:00
|
|
|
|
QSB.Helper.Menus.PauseMenu.GetButton("Button-EndCurrentLoop").Hide();
|
|
|
|
|
|
|
|
|
|
if (isServer)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-28 21:07:39 +00:00
|
|
|
|
var campfires = GameObject.FindObjectsOfType<Campfire>();
|
|
|
|
|
foreach (var campfire in campfires)
|
2020-02-18 20:32:26 +00:00
|
|
|
|
{
|
2020-02-28 21:07:39 +00:00
|
|
|
|
campfire.SetValue("_canSleepHere", false);
|
2020-02-18 20:32:26 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-02-28 21:07:39 +00:00
|
|
|
|
|
2020-02-18 20:32:26 +00:00
|
|
|
|
}
|
|
|
|
|
}
|