public void Reconnect() { Console.WriteLine("Connection lost. Reconnecting."); _vanillaClient.pingThread?.Abort(); Boxes.Clear(); MemorizedBoxes.Clear(); Ores.Clear(); Ships.Clear(); Gates.Clear(); Buildings.Clear(); _proxy.Reset(); if (_vanillaClient.tcpClient.Connected) { _vanillaClient.Disconnect(); } _vanillaClient.thread?.Abort(); }
public static void ClearGates() { Gates.Clear(); NoStatedGates.Clear(); }