Update DreamRaftPatches.cs

This commit is contained in:
JohnCorby 2022-03-27 13:32:10 -07:00
parent aabe9646c2
commit 8abf55da88

View File

@ -13,8 +13,8 @@ public class DreamRaftPatches : QSBPatch
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
[HarmonyPrefix]
[HarmonyPatch(typeof(DreamRaftProjector), nameof(DreamRaftProjector.SetLit))]
private static void SetLit(DreamRaftProjector __instance,
[HarmonyPatch(typeof(DreamRaftProjector), nameof(DreamRaftProjector.SpawnRaft))]
private static void SpawnRaft(DreamRaftProjector __instance,
bool lit)
{
if (Remote)
@ -22,29 +22,6 @@ public class DreamRaftPatches : QSBPatch
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)
{
return;