Zone patches
This commit is contained in:
@@ -11,11 +11,10 @@ using StressLevelZero.Interaction;
|
||||
|
||||
namespace BoneSync.Patching
|
||||
{
|
||||
[HarmonyPatch(typeof(Socket))]
|
||||
public class SocketPatches
|
||||
/*[HarmonyPatch(typeof(Socket))]
|
||||
public static class SocketPatches
|
||||
{
|
||||
[HarmonyPatch(nameof(Socket.OnPlugEnter)), HarmonyPostfix]
|
||||
public static void SocketEnterPatch(Socket __instance, Plug plug)
|
||||
public static void GenericSocketEnterPatch(Socket __instance, Plug plug)
|
||||
{
|
||||
if (!plug) return;
|
||||
MelonLogger.Msg("Plug entered: " + __instance.name + " Plug: " + plug.name);
|
||||
@@ -27,8 +26,7 @@ namespace BoneSync.Patching
|
||||
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(Socket.OnPlugExit)), HarmonyPostfix]
|
||||
public static void SocketExitPatch(Socket __instance, Plug plug)
|
||||
public static void GenericSocketExitPatch(Socket __instance, Plug plug)
|
||||
{
|
||||
if (!plug) return;
|
||||
MelonLogger.Msg("Plug exited: " + __instance.name + " Plug: " + plug.name);
|
||||
@@ -38,8 +36,56 @@ namespace BoneSync.Patching
|
||||
byte socketId = syncable.GetSocketId(__instance);
|
||||
MelonLogger.Msg("Plug exited: " + __instance.transform.GetPath() + " Plug: " + plug.transform.GetPath() + " ID: " + plugId + " Socket ID: " + socketId);
|
||||
}
|
||||
|
||||
|
||||
[HarmonyPatch(nameof(Socket.OnPlugEnter)), HarmonyPostfix]
|
||||
public static void SocketEnterPatch(Socket __instance, Plug plug)
|
||||
{
|
||||
GenericSocketEnterPatch(__instance, plug);
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(Socket.OnPlugExit)), HarmonyPostfix]
|
||||
public static void SocketExitPatch(Socket __instance, Plug plug)
|
||||
{
|
||||
GenericSocketExitPatch(__instance, plug);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(MagazineSocket))]
|
||||
public static class MagazineSocketPatches
|
||||
{
|
||||
[HarmonyPatch(nameof(MagazineSocket.OnPlugEnter)), HarmonyPostfix]
|
||||
public static void MagazineSocketEnterPatch(MagazineSocket __instance, Plug plug)
|
||||
{
|
||||
SocketPatches.GenericSocketEnterPatch(__instance, plug);
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(MagazineSocket.OnPlugExit)), HarmonyPostfix]
|
||||
public static void SocketExitPatch(MagazineSocket __instance, Plug plug)
|
||||
{
|
||||
SocketPatches.GenericSocketExitPatch(__instance, plug);
|
||||
}
|
||||
}*/
|
||||
|
||||
[HarmonyPatch(typeof(AlignPlug))]
|
||||
public static class AlignPlugPatches
|
||||
{
|
||||
[HarmonyPatch(nameof(AlignPlug.InsertPlug)), HarmonyPostfix]
|
||||
public static void AlignPlugInsertPatch(AlignPlug __instance, Socket socket)
|
||||
{
|
||||
MelonLogger.Msg("AlignPlug inserted: " + __instance.transform.GetPath() + " Socket: " + socket.transform.GetPath());
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(AlignPlug.EjectPlug)), HarmonyPostfix]
|
||||
public static void AlignPlugEjectPatch(AlignPlug __instance)
|
||||
{
|
||||
MelonLogger.Msg("AlignPlug ejected: " + __instance.transform.GetPath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class PlugPatches
|
||||
{
|
||||
/*[HarmonyPatch(typeof(Plug))]
|
||||
|
||||
Reference in New Issue
Block a user