From ee6f00bbf1ff8660c363b19bec0db4ddeb194fe5 Mon Sep 17 00:00:00 2001 From: AlienXAXS Date: Thu, 18 Jul 2024 18:53:15 +0100 Subject: [PATCH] Cleanup and name change --- .../DFRelay/DFRelayDirectionStateChangeProcessor.cs | 9 +-------- .../Transpilers/EnemyDFRelayComponent_Transplier.cs | 10 +++------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/NebulaNetwork/PacketProcessors/Combat/DFRelay/DFRelayDirectionStateChangeProcessor.cs b/NebulaNetwork/PacketProcessors/Combat/DFRelay/DFRelayDirectionStateChangeProcessor.cs index 66f60ad32..dde994e3f 100644 --- a/NebulaNetwork/PacketProcessors/Combat/DFRelay/DFRelayDirectionStateChangeProcessor.cs +++ b/NebulaNetwork/PacketProcessors/Combat/DFRelay/DFRelayDirectionStateChangeProcessor.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using NebulaAPI.Packets; +using NebulaAPI.Packets; using NebulaModel.Logger; using NebulaModel.Networking; using NebulaModel.Packets; @@ -23,8 +18,6 @@ protected override void ProcessPacket(DFRelayDirectionStateChangePacket packet, var dfRelayComponent = hiveSystem.relays.buffer[packet.RelayId]; if (dfRelayComponent?.id != packet.RelayId) return; - Log.Debug($"Relay {dfRelayComponent.id} direction:{dfRelayComponent.direction} will be sent home with a new direction: {packet.NewDirection}"); - switch (packet.NewDirection) { case -1: //Relay is being sent home diff --git a/NebulaPatcher/Patches/Transpilers/EnemyDFRelayComponent_Transplier.cs b/NebulaPatcher/Patches/Transpilers/EnemyDFRelayComponent_Transplier.cs index 9d13ad061..c70b416bc 100644 --- a/NebulaPatcher/Patches/Transpilers/EnemyDFRelayComponent_Transplier.cs +++ b/NebulaPatcher/Patches/Transpilers/EnemyDFRelayComponent_Transplier.cs @@ -57,9 +57,8 @@ public static IEnumerable RelaySailLogic_Transpiler(IEnumerable //Call our method new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(EnemyDFRelayComponent_Transplier), - nameof(RelaySendBackToHiveDock)))); - } - ); + nameof(ReplicateRelayDirectionChange)))); + }); return codeMatcher.InstructionEnumeration(); } @@ -71,11 +70,8 @@ public static IEnumerable RelaySailLogic_Transpiler(IEnumerable } } - static void RelaySendBackToHiveDock(int relayId, int stage, int hiveAstroId) + static void ReplicateRelayDirectionChange(int relayId, int stage, int hiveAstroId) { - // This is only called when the RelaySailTick has told the relay to return back to the hive and dock. - Log.Debug($"RelaySendBackToHiveDock called for relay ID {relayId} belonging to hive {hiveAstroId}"); - if (!Multiplayer.IsActive) return; if (!Multiplayer.Session.IsClient) {