Skip to content

Commit

Permalink
Cleanup and name change
Browse files Browse the repository at this point in the history
  • Loading branch information
AlienXAXS committed Jul 18, 2024
1 parent f44dd53 commit ee6f00b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ public static IEnumerable<CodeInstruction> RelaySailLogic_Transpiler(IEnumerable
//Call our method
new CodeInstruction(OpCodes.Call,
AccessTools.Method(typeof(EnemyDFRelayComponent_Transplier),
nameof(RelaySendBackToHiveDock))));
}
);
nameof(ReplicateRelayDirectionChange))));
});

return codeMatcher.InstructionEnumeration();
}
Expand All @@ -71,11 +70,8 @@ public static IEnumerable<CodeInstruction> 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)
{
Expand Down

0 comments on commit ee6f00b

Please sign in to comment.