Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed May 9, 2024
1 parent fa6d5f1 commit a5452c5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using EFT.UI;
using Fika.Core.Coop.Matchmaker;
using Fika.Core.Coop.Players;
using Fika.Core.Extensions;
using Fika.Core.Networking;
using JetBrains.Annotations;
using System.IO;
Expand Down Expand Up @@ -70,7 +69,7 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback
return;
}
operationManager.operation.Dispose();
operationManager.callback?.Fail($"Can't execute {operationManager.operation}", 1);
operationManager.callback?.Fail($"Can't execute {operationManager.operation}", 1);
}
else if (MatchmakerAcceptPatches.IsClient)
{
Expand Down
3 changes: 1 addition & 2 deletions Fika.Core/Coop/Components/CoopHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Aki.Common.Http;
using BepInEx.Logging;
using BepInEx.Logging;
using Comfort.Common;
using EFT;
using EFT.Interactive;
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ public virtual void HandleInventoryPacket(in InventoryPacket packet)
OperationCallbacks.Remove(packet.ItemControllerExecutePacket.CallbackId);
if (!result.Failed)
{
callback(new Result<EOperationStatus>(EOperationStatus.Started));
callback(new Result<EOperationStatus>(EOperationStatus.Started));
}
else
{
Expand Down
5 changes: 2 additions & 3 deletions Fika.Core/FikaPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
using Fika.Core.UI;
using Fika.Core.UI.Models;
using Fika.Core.UI.Patches;
using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Net;
using System.Net.Sockets;
using System.Text;
using UnityEngine;

Expand Down Expand Up @@ -357,7 +356,7 @@ private void SetupConfig()

ForceIP = Config.Bind("Network", "Force IP", "", new ConfigDescription("Forces the server when hosting to use this IP when broadcasting to the backend instead of automatically trying to fetch it. Leave empty to disable.", tags: new ConfigurationManagerAttributes() { Order = 6 }));

ForceBindIP = Config.Bind("Network", "Force Bind IP", "",new ConfigDescription("Forces the server when hosting to use this local IP when starting the server. Useful if you are hosting on a VPN. Leave empty to disable.",new AcceptableValueList<string>(GetLocalIPAddress()), new ConfigurationManagerAttributes() { Order = 5 }));
ForceBindIP = Config.Bind("Network", "Force Bind IP", "", new ConfigDescription("Forces the server when hosting to use this local IP when starting the server. Useful if you are hosting on a VPN. Leave empty to disable.", new AcceptableValueList<string>(GetLocalIPAddress()), new ConfigurationManagerAttributes() { Order = 5 }));

AutoRefreshRate = Config.Bind("Network", "Auto Server Refresh Rate", 10f, new ConfigDescription("Every X seconds the client will ask the server for the list of matches while at the lobby screen.", new AcceptableValueRange<float>(3f, 60f), new ConfigurationManagerAttributes() { Order = 4 }));

Expand Down
1 change: 0 additions & 1 deletion Fika.Core/Networking/FikaClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
using System.Net;
using System.Net.Sockets;
using UnityEngine;
using static UnityEngine.UIElements.StyleVariableResolver;

namespace Fika.Core.Networking
{
Expand Down
5 changes: 2 additions & 3 deletions Fika.Core/UI/Custom/MatchMakerUIScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Security.Cryptography;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
Expand Down Expand Up @@ -185,7 +184,7 @@ private IEnumerator JoinMatch(string profileId, string serverId, Button button)
{
if (button != null)
{
button.enabled = false;
button.enabled = false;
}

NotificationManagerClass.DisplayMessageNotification("Connecting to server...", iconType: EFT.Communications.ENotificationIconType.EntryPoint);
Expand Down Expand Up @@ -216,7 +215,7 @@ private IEnumerator JoinMatch(string profileId, string serverId, Button button)

if (button != null)
{
button.enabled = true;
button.enabled = true;
}
yield break;
}
Expand Down

0 comments on commit a5452c5

Please sign in to comment.