This commit is contained in:
Aaro Varis
2025-03-10 03:58:08 +02:00
parent a7dc4441a7
commit f27e325526
2 changed files with 27 additions and 0 deletions

View File

@@ -112,6 +112,7 @@
<Compile Include="Patching\InteractableHostPatches.cs" /> <Compile Include="Patching\InteractableHostPatches.cs" />
<Compile Include="Patching\ObjectHealthPatches.cs" /> <Compile Include="Patching\ObjectHealthPatches.cs" />
<Compile Include="Patching\PlugPatches.cs" /> <Compile Include="Patching\PlugPatches.cs" />
<Compile Include="Patching\SceneManagerPatches.cs" />
<Compile Include="Patching\SkeletonHandPatches.cs" /> <Compile Include="Patching\SkeletonHandPatches.cs" />
<Compile Include="Patching\ZonePatches.cs" /> <Compile Include="Patching\ZonePatches.cs" />
<Compile Include="Sync\Components\SyncableAI.cs" /> <Compile Include="Sync\Components\SyncableAI.cs" />

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HarmonyLib;
using MelonLoader;
using StressLevelZero.Utilities;
namespace BoneSync.Patching
{
[HarmonyPatch(typeof(BoneworksSceneManager))]
internal class SceneManagerPatches
{
[HarmonyPatch(nameof(BoneworksSceneManager.LoadScene)), HarmonyPostfix]
private static void LoadScenePrefix(BoneworksSceneManager __instance, int sceneBuildIndex)
{
MelonLogger.Msg("LoadScenePrefix: " + sceneBuildIndex);
if (!BoneSync.IsConnected) return;
if (BoneSync.lobby.IsHost)
{
MelonLogger.Msg("Host is loading scene, sending message to clients...");
}
}
}
}