mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-11 06:40:39 +00:00
Update DreamRaftPatches.cs
This commit is contained in:
parent
aabe9646c2
commit
8abf55da88
@ -13,8 +13,8 @@ public class DreamRaftPatches : QSBPatch
|
|||||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(DreamRaftProjector), nameof(DreamRaftProjector.SetLit))]
|
[HarmonyPatch(typeof(DreamRaftProjector), nameof(DreamRaftProjector.SpawnRaft))]
|
||||||
private static void SetLit(DreamRaftProjector __instance,
|
private static void SpawnRaft(DreamRaftProjector __instance,
|
||||||
bool lit)
|
bool lit)
|
||||||
{
|
{
|
||||||
if (Remote)
|
if (Remote)
|
||||||
@ -22,29 +22,6 @@ public class DreamRaftPatches : QSBPatch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__instance._lit == lit)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!QSBWorldSync.AllObjectsReady)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
__instance.GetWorldObject<QSBDreamRaftProjector>()
|
|
||||||
.SendMessage(new SpawnRaftMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPrefix]
|
|
||||||
[HarmonyPatch(typeof(DreamRaftProjector), nameof(DreamRaftProjector.RespawnRaft))]
|
|
||||||
private static void RespawnRaft(DreamRaftProjector __instance)
|
|
||||||
{
|
|
||||||
if (Remote)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!QSBWorldSync.AllObjectsReady)
|
if (!QSBWorldSync.AllObjectsReady)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user