mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-09 12:54:51 +00:00
34 lines
755 B
C#
34 lines
755 B
C#
using QSB.GeyserSync.WorldObjects;
|
|
using QSB.Patches;
|
|
using QSB.WorldSync;
|
|
using UnityEngine;
|
|
|
|
namespace QSB.GeyserSync
|
|
{
|
|
public class GeyserManager : MonoBehaviour
|
|
{
|
|
public void Awake()
|
|
{
|
|
QSBSceneManager.OnSceneLoaded += OnSceneLoaded;
|
|
QSBPatchManager.OnPatchType += OnPatchType;
|
|
}
|
|
|
|
public void OnDestroy()
|
|
{
|
|
QSBSceneManager.OnSceneLoaded -= OnSceneLoaded;
|
|
QSBPatchManager.OnPatchType -= OnPatchType;
|
|
}
|
|
|
|
private void OnSceneLoaded(OWScene scene, bool isInUniverse)
|
|
=> QSBWorldSync.Init<QSBGeyser, GeyserController>();
|
|
|
|
public void OnPatchType(QSBPatchTypes type)
|
|
{
|
|
if (type != QSBPatchTypes.OnNonServerClientConnect)
|
|
{
|
|
return;
|
|
}
|
|
QSBCore.HarmonyHelper.EmptyMethod<GeyserController>("Update");
|
|
}
|
|
}
|
|
} |