From f56290d4f2731fea65e644565e2b295b16ecdd8a Mon Sep 17 00:00:00 2001
From: Lacyway <20912169+Lacyway@users.noreply.github.com>
Date: Fri, 24 May 2024 09:20:16 +0200
Subject: [PATCH] Running and working 3.9 build
---
.../Airdrops/Models/FikaAirdropConfigModel.cs | 2 +-
.../Airdrops/Models/FikaAirdropLootModel.cs | 2 +-
.../Models/FikaAirdropParametersModel.cs | 4 +-
.../Patches/FikaAirdropFlare_Patch.cs | 4 +-
.../Airdrops/Utils/FikaAirdropUtil.cs | 6 +-
.../Airdrops/Utils/FikaItemFactoryUtil.cs | 6 +-
...EnemyToAllGroupsInBotZonePatch_Override.cs | 4 +-
.../Overrides/BotDifficultyPatch_Override.cs | 6 +-
.../BotTemplateLimitPatch_Override.cs | 6 +-
.../Overrides/MaxBotPatch_Override.cs | 8 +-
.../OfflineRaidSettingsMenuPatch_Override.cs | 4 +-
.../Scav/ScavProfileLoad_Override.cs | 6 +-
.../Coop/Airdrops/FikaAirdropsManager.cs | 4 +-
Fika.Core/Coop/BTR/FikaBTRManager_Client.cs | 12 +--
Fika.Core/Coop/BTR/FikaBTRManager_Host.cs | 12 +--
.../CoopClientFirearmController.cs | 1 -
Fika.Core/Coop/Custom/FikaDynamicAI.cs | 1 -
.../Coop/FreeCamera/FadeBlackScreen_Patch.cs | 4 +-
.../FreeCamera/Patches/DeathFade_Patch.cs | 2 +-
Fika.Core/Coop/GameMode/AFikaGame.cs | 2 +-
Fika.Core/Coop/GameMode/CoopGame.cs | 82 +++++++++++++------
.../Matchmaker/EnvironmentUIRoot_Patch.cs | 4 +-
.../MatchmakerAcceptScreen_Awake_Patch.cs | 6 +-
.../MatchmakerAcceptScreen_Show_Patch.cs | 4 +-
.../CoopObservedFirearmController.cs | 10 +++
.../AbstractGame/AbstractGame_InRaid_Patch.cs | 4 +-
Fika.Core/Coop/Patches/BotCacher_Patch.cs | 4 +-
.../LocalGame/NonWaveSpawnScenario_Patch.cs | 4 +-
...arkovApplication_LocalGameCreator_Patch.cs | 8 +-
.../LocalGame/WaveSpawnScenario_Patch.cs | 4 +-
.../Minefield/Minefield_method_2_Patch.cs | 4 +-
Fika.Core/Coop/Players/CoopBot.cs | 2 +-
Fika.Core/Coop/World/WeatherNode_Patch.cs | 4 +-
.../FikaVersionLabel_Patch.cs | 12 +--
Fika.Core/Fika.Core.csproj | 34 ++++----
Fika.Core/FikaPlugin.cs | 21 ++---
Fika.Core/Models/BotDifficulties.cs | 4 +-
Fika.Core/Networking/FikaClient.cs | 4 +-
Fika.Core/Networking/FikaServer.cs | 2 +-
.../Fuyu.Platform.Common/Http/FuyuClient.cs | 2 +-
Fika.Core/Networking/Http/FikaHttpHandler.cs | 2 +-
.../Networking/Open.Nat/Utils/Extensions.cs | 2 +-
.../Packets/GameWorld/AirdropPacket.cs | 2 +-
.../DisableInsuranceReadyButton_Patch.cs | 2 +-
.../DisableMatchSettingsReadyButton_Patch.cs | 2 +-
.../UI/Patches/DisableReadyButton_Patch.cs | 2 +-
Fika.Core/UI/Patches/InventoryScroll_Patch.cs | 4 +-
Fika.Core/UI/Patches/ItemContext_Patch.cs | 14 ++--
Fika.Core/UI/Patches/TOS_Patch.cs | 4 +-
49 files changed, 196 insertions(+), 153 deletions(-)
diff --git a/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropConfigModel.cs b/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropConfigModel.cs
index 44eb19b4..8043069c 100644
--- a/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropConfigModel.cs
+++ b/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropConfigModel.cs
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;
-namespace Aki.Custom.Airdrops.Models
+namespace SPT.Custom.Airdrops.Models
{
///
/// Created by: SPT-Aki team
diff --git a/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropLootModel.cs b/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropLootModel.cs
index b089f877..2d4c40ca 100644
--- a/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropLootModel.cs
+++ b/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropLootModel.cs
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using System.Collections.Generic;
-namespace Aki.Custom.Airdrops.Models
+namespace SPT.Custom.Airdrops.Models
{
///
/// Created by: SPT-Aki team
diff --git a/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropParametersModel.cs b/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropParametersModel.cs
index dd3f8ba6..6a63b241 100644
--- a/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropParametersModel.cs
+++ b/Fika.Core/AkiSupport/Airdrops/Models/FikaAirdropParametersModel.cs
@@ -1,5 +1,5 @@
-using Aki.Custom.Airdrops.Models;
-using Newtonsoft.Json;
+using Newtonsoft.Json;
+using SPT.Custom.Airdrops.Models;
using UnityEngine;
namespace Fika.Core.AkiSupport.Airdrops.Models
diff --git a/Fika.Core/AkiSupport/Airdrops/Patches/FikaAirdropFlare_Patch.cs b/Fika.Core/AkiSupport/Airdrops/Patches/FikaAirdropFlare_Patch.cs
index 854e0f89..301ccdff 100644
--- a/Fika.Core/AkiSupport/Airdrops/Patches/FikaAirdropFlare_Patch.cs
+++ b/Fika.Core/AkiSupport/Airdrops/Patches/FikaAirdropFlare_Patch.cs
@@ -1,7 +1,7 @@
-using Aki.Reflection.Patching;
-using Comfort.Common;
+using Comfort.Common;
using EFT;
using EFT.Airdrop;
+using SPT.Reflection.Patching;
using System.Linq;
using System.Reflection;
diff --git a/Fika.Core/AkiSupport/Airdrops/Utils/FikaAirdropUtil.cs b/Fika.Core/AkiSupport/Airdrops/Utils/FikaAirdropUtil.cs
index 2ddf970b..78d9c6dd 100644
--- a/Fika.Core/AkiSupport/Airdrops/Utils/FikaAirdropUtil.cs
+++ b/Fika.Core/AkiSupport/Airdrops/Utils/FikaAirdropUtil.cs
@@ -1,9 +1,9 @@
-using Aki.Common.Http;
-using Aki.Custom.Airdrops.Models;
-using EFT;
+using EFT;
using EFT.Airdrop;
using Fika.Core.AkiSupport.Airdrops.Models;
using Newtonsoft.Json;
+using SPT.Common.Http;
+using SPT.Custom.Airdrops.Models;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Fika.Core/AkiSupport/Airdrops/Utils/FikaItemFactoryUtil.cs b/Fika.Core/AkiSupport/Airdrops/Utils/FikaItemFactoryUtil.cs
index a4e7cbaa..847431b0 100644
--- a/Fika.Core/AkiSupport/Airdrops/Utils/FikaItemFactoryUtil.cs
+++ b/Fika.Core/AkiSupport/Airdrops/Utils/FikaItemFactoryUtil.cs
@@ -1,12 +1,12 @@
-using Aki.Common.Http;
-using Aki.Custom.Airdrops.Models;
-using BepInEx.Logging;
+using BepInEx.Logging;
using Comfort.Common;
using EFT;
using EFT.Interactive;
using EFT.InventoryLogic;
using Fika.Core;
using Newtonsoft.Json;
+using SPT.Common.Http;
+using SPT.Custom.Airdrops.Models;
using System.Linq;
namespace Aki.Custom.Airdrops.Utils
diff --git a/Fika.Core/AkiSupport/Overrides/AddEnemyToAllGroupsInBotZonePatch_Override.cs b/Fika.Core/AkiSupport/Overrides/AddEnemyToAllGroupsInBotZonePatch_Override.cs
index 220a8b7a..9cb97666 100644
--- a/Fika.Core/AkiSupport/Overrides/AddEnemyToAllGroupsInBotZonePatch_Override.cs
+++ b/Fika.Core/AkiSupport/Overrides/AddEnemyToAllGroupsInBotZonePatch_Override.cs
@@ -1,7 +1,7 @@
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
using Fika.Core.Coop.Players;
using HarmonyLib;
+using SPT.Reflection.Patching;
using System.Collections.Generic;
using System.Reflection;
diff --git a/Fika.Core/AkiSupport/Overrides/BotDifficultyPatch_Override.cs b/Fika.Core/AkiSupport/Overrides/BotDifficultyPatch_Override.cs
index 13c85b4a..781de494 100644
--- a/Fika.Core/AkiSupport/Overrides/BotDifficultyPatch_Override.cs
+++ b/Fika.Core/AkiSupport/Overrides/BotDifficultyPatch_Override.cs
@@ -1,7 +1,7 @@
-using Aki.Common.Http;
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
using Fika.Core.Coop.Matchmaker;
+using SPT.Common.Http;
+using SPT.Reflection.Patching;
using System.Reflection;
namespace Fika.Core.AkiSupport.Overrides
diff --git a/Fika.Core/AkiSupport/Overrides/BotTemplateLimitPatch_Override.cs b/Fika.Core/AkiSupport/Overrides/BotTemplateLimitPatch_Override.cs
index c6e98227..403f80cf 100644
--- a/Fika.Core/AkiSupport/Overrides/BotTemplateLimitPatch_Override.cs
+++ b/Fika.Core/AkiSupport/Overrides/BotTemplateLimitPatch_Override.cs
@@ -1,7 +1,7 @@
-using Aki.Common.Http;
-using Aki.Reflection.Patching;
-using Fika.Core.Coop.Matchmaker;
+using Fika.Core.Coop.Matchmaker;
using HarmonyLib;
+using SPT.Common.Http;
+using SPT.Reflection.Patching;
using System;
using System.Collections.Generic;
using System.Reflection;
diff --git a/Fika.Core/AkiSupport/Overrides/MaxBotPatch_Override.cs b/Fika.Core/AkiSupport/Overrides/MaxBotPatch_Override.cs
index f6e7edac..6276eb0a 100644
--- a/Fika.Core/AkiSupport/Overrides/MaxBotPatch_Override.cs
+++ b/Fika.Core/AkiSupport/Overrides/MaxBotPatch_Override.cs
@@ -1,7 +1,7 @@
-using Aki.Common.Http;
-using Aki.Reflection.Patching;
-using Aki.Reflection.Utils;
-using Fika.Core.Coop.Matchmaker;
+using Fika.Core.Coop.Matchmaker;
+using SPT.Common.Http;
+using SPT.Reflection.Patching;
+using SPT.Reflection.Utils;
using System.Reflection;
namespace Fika.Core.AkiSupport.Overrides
diff --git a/Fika.Core/AkiSupport/Overrides/OfflineRaidSettingsMenuPatch_Override.cs b/Fika.Core/AkiSupport/Overrides/OfflineRaidSettingsMenuPatch_Override.cs
index 137286a0..4a07ae38 100644
--- a/Fika.Core/AkiSupport/Overrides/OfflineRaidSettingsMenuPatch_Override.cs
+++ b/Fika.Core/AkiSupport/Overrides/OfflineRaidSettingsMenuPatch_Override.cs
@@ -1,7 +1,7 @@
-using Aki.Reflection.Patching;
-using EFT.UI;
+using EFT.UI;
using EFT.UI.Matchmaker;
using HarmonyLib;
+using SPT.Reflection.Patching;
using System;
using System.Collections.Generic;
using System.Reflection;
diff --git a/Fika.Core/AkiSupport/Scav/ScavProfileLoad_Override.cs b/Fika.Core/AkiSupport/Scav/ScavProfileLoad_Override.cs
index ae7caec2..93be45ec 100644
--- a/Fika.Core/AkiSupport/Scav/ScavProfileLoad_Override.cs
+++ b/Fika.Core/AkiSupport/Scav/ScavProfileLoad_Override.cs
@@ -1,12 +1,12 @@
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
+using SPT.Reflection.Patching;
using System.Reflection;
namespace Fika.Core.AkiSupport.Scav
{
internal class ScavProfileLoad_Override : ModulePatch
{
- protected override MethodBase GetTargetMethod() => typeof(TarkovApplication).GetMethod(nameof(TarkovApplication.method_46));
+ protected override MethodBase GetTargetMethod() => typeof(TarkovApplication).GetMethod(nameof(TarkovApplication.method_50));
[PatchPrefix]
private static void PatchPrefix(ref string profileId, Profile savageProfile, RaidSettings ____raidSettings)
diff --git a/Fika.Core/Coop/Airdrops/FikaAirdropsManager.cs b/Fika.Core/Coop/Airdrops/FikaAirdropsManager.cs
index 32bc1dbd..b5472778 100644
--- a/Fika.Core/Coop/Airdrops/FikaAirdropsManager.cs
+++ b/Fika.Core/Coop/Airdrops/FikaAirdropsManager.cs
@@ -1,5 +1,4 @@
-using Aki.Custom.Airdrops.Models;
-using Aki.Custom.Airdrops.Utils;
+using Aki.Custom.Airdrops.Utils;
using BepInEx.Logging;
using Comfort.Common;
using EFT;
@@ -13,6 +12,7 @@
using Fika.Core.Networking;
using LiteNetLib;
using LiteNetLib.Utils;
+using SPT.Custom.Airdrops.Models;
using System;
using System.Collections;
using UnityEngine;
diff --git a/Fika.Core/Coop/BTR/FikaBTRManager_Client.cs b/Fika.Core/Coop/BTR/FikaBTRManager_Client.cs
index 1f06af9d..5fe4f077 100644
--- a/Fika.Core/Coop/BTR/FikaBTRManager_Client.cs
+++ b/Fika.Core/Coop/BTR/FikaBTRManager_Client.cs
@@ -1,7 +1,4 @@
-using Aki.Custom.BTR;
-using Aki.Custom.BTR.Utils;
-using Aki.SinglePlayer.Utils.TraderServices;
-using BepInEx.Logging;
+using BepInEx.Logging;
using Comfort.Common;
using EFT;
using EFT.AssetsManager;
@@ -13,6 +10,9 @@
using Fika.Core.Networking;
using HarmonyLib;
using LiteNetLib.Utils;
+using SPT.Custom.BTR;
+using SPT.Custom.BTR.Utils;
+using SPT.SinglePlayer.Utils.TraderServices;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -360,8 +360,8 @@ private BTRDataPacket UpdateDataPacket()
btrDataPacket.rotation = btrServerSide.transform.rotation;
if (btrTurretServer != null && btrTurretServer.gunsBlockRoot != null)
{
- btrDataPacket.turretRotation = btrTurretServer.transform.rotation;
- btrDataPacket.gunsBlockRotation = btrTurretServer.gunsBlockRoot.rotation;
+ btrDataPacket.turretRotation = btrTurretServer.transform.localEulerAngles.y;
+ btrDataPacket.gunsBlockRotation = btrTurretServer.gunsBlockRoot.localEulerAngles.x;
}
btrDataPacket.State = (byte)btrServerSide.BtrState;
btrDataPacket.RouteState = (byte)btrServerSide.VehicleRouteState;
diff --git a/Fika.Core/Coop/BTR/FikaBTRManager_Host.cs b/Fika.Core/Coop/BTR/FikaBTRManager_Host.cs
index b5bcbb52..6ea53700 100644
--- a/Fika.Core/Coop/BTR/FikaBTRManager_Host.cs
+++ b/Fika.Core/Coop/BTR/FikaBTRManager_Host.cs
@@ -1,7 +1,4 @@
-using Aki.Custom.BTR;
-using Aki.Custom.BTR.Utils;
-using Aki.SinglePlayer.Utils.TraderServices;
-using BepInEx.Logging;
+using BepInEx.Logging;
using Comfort.Common;
using EFT;
using EFT.GlobalEvents;
@@ -13,6 +10,9 @@
using HarmonyLib;
using LiteNetLib;
using LiteNetLib.Utils;
+using SPT.Custom.BTR;
+using SPT.Custom.BTR.Utils;
+using SPT.SinglePlayer.Utils.TraderServices;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -481,8 +481,8 @@ private BTRDataPacket UpdateDataPacket()
btrDataPacket.rotation = btrServerSide.transform.rotation;
if (btrTurretServer != null && btrTurretServer.gunsBlockRoot != null)
{
- btrDataPacket.turretRotation = btrTurretServer.transform.rotation;
- btrDataPacket.gunsBlockRotation = btrTurretServer.gunsBlockRoot.rotation;
+ btrDataPacket.turretRotation = btrTurretServer.transform.localEulerAngles.y;
+ btrDataPacket.gunsBlockRotation = btrTurretServer.gunsBlockRoot.localEulerAngles.x;
}
btrDataPacket.State = (byte)btrServerSide.BtrState;
btrDataPacket.RouteState = (byte)btrServerSide.VehicleRouteState;
diff --git a/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs b/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs
index 093d0242..3013dce1 100644
--- a/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs
+++ b/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs
@@ -9,7 +9,6 @@
using System.Collections.Generic;
using System.IO;
using UnityEngine;
-using static EFT.ClientFirearmController;
namespace Fika.Core.Coop.ClientClasses
{
diff --git a/Fika.Core/Coop/Custom/FikaDynamicAI.cs b/Fika.Core/Coop/Custom/FikaDynamicAI.cs
index 909212e8..d263fe26 100644
--- a/Fika.Core/Coop/Custom/FikaDynamicAI.cs
+++ b/Fika.Core/Coop/Custom/FikaDynamicAI.cs
@@ -6,7 +6,6 @@
using Fika.Core.Coop.Components;
using Fika.Core.Coop.Players;
using System.Collections.Generic;
-using System.Linq;
using UnityEngine;
namespace Fika.Core.Coop.Custom
diff --git a/Fika.Core/Coop/FreeCamera/FadeBlackScreen_Patch.cs b/Fika.Core/Coop/FreeCamera/FadeBlackScreen_Patch.cs
index 9bd93c5d..fbf4b186 100644
--- a/Fika.Core/Coop/FreeCamera/FadeBlackScreen_Patch.cs
+++ b/Fika.Core/Coop/FreeCamera/FadeBlackScreen_Patch.cs
@@ -1,5 +1,5 @@
-using Aki.Reflection.Patching;
-using EFT.UI;
+using EFT.UI;
+using SPT.Reflection.Patching;
using System;
using System.Reflection;
using UnityEngine;
diff --git a/Fika.Core/Coop/FreeCamera/Patches/DeathFade_Patch.cs b/Fika.Core/Coop/FreeCamera/Patches/DeathFade_Patch.cs
index c130fe39..3dda5851 100644
--- a/Fika.Core/Coop/FreeCamera/Patches/DeathFade_Patch.cs
+++ b/Fika.Core/Coop/FreeCamera/Patches/DeathFade_Patch.cs
@@ -1,4 +1,4 @@
-using Aki.Reflection.Patching;
+using SPT.Reflection.Patching;
using System;
using System.Reflection;
using UnityEngine;
diff --git a/Fika.Core/Coop/GameMode/AFikaGame.cs b/Fika.Core/Coop/GameMode/AFikaGame.cs
index 6c502945..f96be0db 100644
--- a/Fika.Core/Coop/GameMode/AFikaGame.cs
+++ b/Fika.Core/Coop/GameMode/AFikaGame.cs
@@ -1,4 +1,4 @@
-/*using Aki.Reflection.Utils;
+/*using SPT.Reflection.Utils;
using BepInEx.Logging;
using Comfort.Common;
using EFT;
diff --git a/Fika.Core/Coop/GameMode/CoopGame.cs b/Fika.Core/Coop/GameMode/CoopGame.cs
index 4ac8db46..b8e1b012 100644
--- a/Fika.Core/Coop/GameMode/CoopGame.cs
+++ b/Fika.Core/Coop/GameMode/CoopGame.cs
@@ -1,10 +1,4 @@
-using Aki.Common.Http;
-using Aki.Custom.Airdrops;
-using Aki.Reflection.Utils;
-using Aki.SinglePlayer.Models.Progression;
-using Aki.SinglePlayer.Utils.Healing;
-using Aki.SinglePlayer.Utils.Insurance;
-using Aki.SinglePlayer.Utils.Progression;
+using Aki.Custom.Airdrops;
using BepInEx.Logging;
using Comfort.Common;
using CommonAssets.Scripts.Game;
@@ -15,11 +9,11 @@
using EFT.Counters;
using EFT.EnvironmentEffect;
using EFT.Game.Spawning;
-using EFT.InputSystem;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.UI;
using EFT.UI.BattleTimer;
+using EFT.UI.Matchmaker;
using EFT.UI.Screens;
using EFT.Weather;
using Fika.Core.Coop.BTR;
@@ -40,6 +34,12 @@
using JsonType;
using LiteNetLib.Utils;
using Newtonsoft.Json;
+using SPT.Common.Http;
+using SPT.Reflection.Utils;
+using SPT.SinglePlayer.Models.Progression;
+using SPT.SinglePlayer.Utils.Healing;
+using SPT.SinglePlayer.Utils.Insurance;
+using SPT.SinglePlayer.Utils.Progression;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -488,7 +488,7 @@ private bool TryDespawnFurthest(Profile profile, Vector3 position, CoopHandler c
if (botKey == string.Empty)
{
#if DEBUG
- Logger.LogWarning("TryDespawnFurthest: botKey was empty");
+ Logger.LogWarning("TryDespawnFurthest: botKey was empty");
#endif
return false;
}
@@ -539,7 +539,7 @@ private void DespawnBot(CoopHandler coopHandler, Player bot)
}
///
- /// We use instead
+ /// We use instead
///
///
public override IEnumerator vmethod_1()
@@ -552,7 +552,7 @@ public override IEnumerator vmethod_1()
/// Matchmaker countdown
///
/// Time in seconds to count down
- private async void DeployScreen(float timeBeforeDeploy)
+ private async Task WaitScreen(int timeBeforeDeploy)
{
if (CoopHandler.TryGetCoopHandler(out CoopHandler coopHandler))
{
@@ -572,7 +572,6 @@ private async void DeployScreen(float timeBeforeDeploy)
await FikaRequestHandler.UpdateSetStatus(status);
Singleton.Instance.ReadyClients++;
- base.vmethod_1(timeBeforeDeploy);
return;
}
@@ -649,10 +648,18 @@ private async void DeployScreen(float timeBeforeDeploy)
{
Destroy(fikaStartButton);
}
-
}
+ }
- base.vmethod_1(timeBeforeDeploy);
+ private async Task DeployScreen(int timeBeforeDeploy)
+ {
+ DateTime dateTime = GClass1304.Now.AddSeconds(timeBeforeDeploy);
+ new MatchmakerFinalCountdown.GClass3181(Profile_0, dateTime).ShowScreen(EScreenState.Root);
+ MonoBehaviourSingleton.Instance.FadeInVolumeBeforeRaid(timeBeforeDeploy);
+ Singleton.Instance.StopMenuBackgroundMusicWithDelay(timeBeforeDeploy);
+ GameUi.gameObject.SetActive(true);
+ GameUi.TimerPanel.ProfileId = ProfileId;
+ await Task.Delay(timeBeforeDeploy * 1000);
}
private async Task SendOrReceiveSpawnPoint()
@@ -1025,7 +1032,7 @@ private async Task WaitForPlayers()
{
Logger.LogError("WaitForPlayers::GClass3163 was null!");
}
- await Task.Delay(1000);
+ await Task.Delay(100);
} while (numbersOfPlayersToWaitFor > 0 && !forceStart);
}
else if (MatchmakerAcceptPatches.IsClient)
@@ -1109,6 +1116,10 @@ private async Task SetStatus(LocalPlayer myPlayer, LobbyEntry.ELobbyStatus statu
///
public override IEnumerator vmethod_4(BotControllerSettings controllerSettings, ISpawnSystem spawnSystem, Callback runCallback)
{
+#if DEBUG
+ Logger.LogWarning("CoopGame::vmethod_4");
+#endif
+
if (MatchmakerAcceptPatches.IsClient)
{
controllerSettings.BotAmount = EBotAmount.NoBots;
@@ -1169,7 +1180,7 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,
if (limits > 0)
{
botsController_0.BotSpawner.SetMaxBots(limits);
- }
+ }
}
DynamicAI = gameObject.AddComponent();
@@ -1201,13 +1212,20 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,
seasonTaskHandler.task = seasonHandler.Run(season);
yield return new WaitUntil(new Func(seasonTaskHandler.method_0));
- if (startDelay < 5)
+ int timeBeforeDeployLocal = Singleton.Instance.TimeBeforeDeployLocal;
+
+ if (timeBeforeDeployLocal < 5)
{
- startDelay = 5;
+ timeBeforeDeployLocal = 5;
NotificationManagerClass.DisplayWarningNotification("You have set the deploy timer too low, resetting to 5!");
}
- DeployScreen(startDelay);
+ Task waitTask = WaitScreen(timeBeforeDeployLocal);
+
+ while (!waitTask.IsCompleted)
+ {
+ yield return null;
+ }
if (MatchmakerAcceptPatches.IsServer)
{
@@ -1224,8 +1242,6 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,
}
}
- yield return new WaitForSeconds(startDelay);
-
if (MatchmakerAcceptPatches.IsServer)
{
if (Location_0.OldSpawn && wavesSpawnScenario_0.SpawnWaves != null && wavesSpawnScenario_0.SpawnWaves.Length != 0)
@@ -1267,9 +1283,19 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,
}
}
+ Task deployTask = DeployScreen(timeBeforeDeployLocal);
+
+ while (!deployTask.IsCompleted)
+ {
+ yield return null;
+ }
+
yield return new WaitForEndOfFrame();
- CreateExfiltrationPointAndInitDeathHandler();
+ using (GClass21.StartWithToken("SessionRun"))
+ {
+ CreateExfiltrationPointAndInitDeathHandler();
+ }
// Add FreeCamController to GameWorld GameObject
Singleton.Instance.gameObject.GetOrAddComponent();
@@ -1364,9 +1390,15 @@ public void CreateExfiltrationPointAndInitDeathHandler()
{
Logger.LogInfo("CreateExfiltrationPointAndInitDeathHandler");
- GameTimer.Start();
- gparam_0.vmethod_0();
+ GameTimer.Start(null, null);
gparam_0.Player.HealthController.DiedEvent += HealthController_DiedEvent;
+ gparam_0.vmethod_0();
+
+ SkillClass[] skills = Profile_0.Skills.Skills;
+ for (int i = 0; i < skills.Length; i++)
+ {
+ skills[i].SetPointsEarnedInSession(0f, false);
+ }
InfiltrationPoint = spawnPoint.Infiltration;
Profile_0.Info.EntryPoint = InfiltrationPoint;
@@ -1498,7 +1530,7 @@ public void Extract(CoopPlayer player, ExfiltrationPoint point)
CoopHandler coopHandler = CoopHandler.GetCoopHandler();
- CoopPlayer coopPlayer = (CoopPlayer)player;
+ CoopPlayer coopPlayer = player;
ExtractedPlayers.Add(coopPlayer.NetId);
coopHandler.ExtractedPlayers.Add(coopPlayer.NetId);
coopHandler.Players.Remove(coopPlayer.NetId);
diff --git a/Fika.Core/Coop/Matchmaker/EnvironmentUIRoot_Patch.cs b/Fika.Core/Coop/Matchmaker/EnvironmentUIRoot_Patch.cs
index cedf7b6c..db1816d4 100644
--- a/Fika.Core/Coop/Matchmaker/EnvironmentUIRoot_Patch.cs
+++ b/Fika.Core/Coop/Matchmaker/EnvironmentUIRoot_Patch.cs
@@ -1,5 +1,5 @@
-using Aki.Reflection.Patching;
-using EFT.UI;
+using EFT.UI;
+using SPT.Reflection.Patching;
using System.Reflection;
namespace Fika.Core.Coop.Matchmaker
diff --git a/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Awake_Patch.cs b/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Awake_Patch.cs
index d01f2324..1d8a37b3 100644
--- a/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Awake_Patch.cs
+++ b/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Awake_Patch.cs
@@ -1,7 +1,7 @@
-using Aki.Reflection.Patching;
-using Aki.Reflection.Utils;
-using EFT.UI.Matchmaker;
+using EFT.UI.Matchmaker;
using Newtonsoft.Json;
+using SPT.Reflection.Patching;
+using SPT.Reflection.Utils;
using System;
using System.Linq;
using System.Reflection;
diff --git a/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Show_Patch.cs b/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Show_Patch.cs
index 247f50a3..876bebcf 100644
--- a/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Show_Patch.cs
+++ b/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptScreen_Show_Patch.cs
@@ -1,8 +1,8 @@
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
using EFT.UI;
using EFT.UI.Matchmaker;
using Fika.Core.UI.Custom;
+using SPT.Reflection.Patching;
using System.Linq;
using System.Reflection;
using UnityEngine;
diff --git a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs
index df77383d..f7401863 100644
--- a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs
+++ b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs
@@ -609,6 +609,16 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass
{
StartCoroutine(ObservedBoltAction(FirearmsAnimator, this, inventoryController));
}
+
+ if (packet.UnderbarrelSightingRangeUp)
+ {
+ UnderbarrelSightingRangeUp();
+ }
+
+ if (packet.UnderbarrelSightingRangeDown)
+ {
+ UnderbarrelSightingRangeDown();
+ }
}
private IEnumerator ObservedBoltAction(FirearmsAnimator animator, FirearmController controller, InventoryControllerClass inventoryController)
diff --git a/Fika.Core/Coop/Patches/AbstractGame/AbstractGame_InRaid_Patch.cs b/Fika.Core/Coop/Patches/AbstractGame/AbstractGame_InRaid_Patch.cs
index 8a5f9a6e..354f9127 100644
--- a/Fika.Core/Coop/Patches/AbstractGame/AbstractGame_InRaid_Patch.cs
+++ b/Fika.Core/Coop/Patches/AbstractGame/AbstractGame_InRaid_Patch.cs
@@ -1,6 +1,6 @@
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
using Fika.Core.Coop.GameMode;
+using SPT.Reflection.Patching;
using System.Reflection;
namespace Fika.Core.Coop.Patches
diff --git a/Fika.Core/Coop/Patches/BotCacher_Patch.cs b/Fika.Core/Coop/Patches/BotCacher_Patch.cs
index 50517e14..90f9e925 100644
--- a/Fika.Core/Coop/Patches/BotCacher_Patch.cs
+++ b/Fika.Core/Coop/Patches/BotCacher_Patch.cs
@@ -1,6 +1,6 @@
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
using Fika.Core.Coop.Matchmaker;
+using SPT.Reflection.Patching;
using System;
using System.Reflection;
diff --git a/Fika.Core/Coop/Patches/LocalGame/NonWaveSpawnScenario_Patch.cs b/Fika.Core/Coop/Patches/LocalGame/NonWaveSpawnScenario_Patch.cs
index 135572ac..56f382ad 100644
--- a/Fika.Core/Coop/Patches/LocalGame/NonWaveSpawnScenario_Patch.cs
+++ b/Fika.Core/Coop/Patches/LocalGame/NonWaveSpawnScenario_Patch.cs
@@ -1,6 +1,6 @@
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
using Fika.Core.Coop.Matchmaker;
+using SPT.Reflection.Patching;
using System.Reflection;
namespace Fika.Core.Coop.Patches.LocalGame
diff --git a/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs b/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs
index 00b6c8a0..ccef265c 100644
--- a/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs
+++ b/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs
@@ -1,5 +1,4 @@
-using Aki.Reflection.Patching;
-using Comfort.Common;
+using Comfort.Common;
using EFT;
using EFT.InputSystem;
using EFT.UI;
@@ -10,6 +9,7 @@
using Fika.Core.Modding.Events;
using Fika.Core.Networking.Http;
using Fika.Core.Networking.Http.Models;
+using SPT.Reflection.Patching;
using System;
using System.Linq;
using System.Reflection;
@@ -49,7 +49,7 @@ public static bool Prefix(TarkovApplication __instance)
[PatchPostfix]
public static async Task Postfix(Task __result, TarkovApplication __instance, TimeAndWeatherSettings timeAndWeather, MatchmakerTimeHasCome.GClass3182 timeHasComeScreenController,
- RaidSettings ____raidSettings, InputTree ____inputTree, GameDateTime ____localGameDateTime, float ____fixedDeltaTime, string ____backendUrl, EUpdateQueue __PlayerUpdateQueue)
+ RaidSettings ____raidSettings, InputTree ____inputTree, GameDateTime ____localGameDateTime, float ____fixedDeltaTime, string ____backendUrl)
{
if (MatchmakerAcceptPatches.IsSinglePlayer)
{
@@ -113,7 +113,7 @@ public static async Task Postfix(Task __result, TarkovApplication __instance, Ti
CoopGame coopgAme = CoopGame.Create(____inputTree, profile, ____localGameDateTime, session.InsuranceCompany, MonoBehaviourSingleton.Instance, MonoBehaviourSingleton.Instance,
____raidSettings.SelectedLocation, timeAndWeather, ____raidSettings.WavesSettings, ____raidSettings.SelectedDateTime, new Callback(startHandler.HandleStart),
- ____fixedDeltaTime, __PlayerUpdateQueue, session, TimeSpan.FromSeconds(60 * ____raidSettings.SelectedLocation.EscapeTimeLimit), ____raidSettings);
+ ____fixedDeltaTime, EUpdateQueue.Update, session, TimeSpan.FromSeconds(60 * ____raidSettings.SelectedLocation.EscapeTimeLimit), ____raidSettings);
Singleton.Create(coopgAme);
FikaEventDispatcher.DispatchEvent(new AbstractGameCreatedEvent(coopgAme));
diff --git a/Fika.Core/Coop/Patches/LocalGame/WaveSpawnScenario_Patch.cs b/Fika.Core/Coop/Patches/LocalGame/WaveSpawnScenario_Patch.cs
index 32e27772..d46eccdf 100644
--- a/Fika.Core/Coop/Patches/LocalGame/WaveSpawnScenario_Patch.cs
+++ b/Fika.Core/Coop/Patches/LocalGame/WaveSpawnScenario_Patch.cs
@@ -1,6 +1,6 @@
-using Aki.Reflection.Patching;
-using EFT;
+using EFT;
using Fika.Core.Coop.Matchmaker;
+using SPT.Reflection.Patching;
using System.Reflection;
namespace Fika.Core.Coop.Patches.LocalGame
diff --git a/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs b/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs
index a619f362..d4f6ccc3 100644
--- a/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs
+++ b/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs
@@ -1,9 +1,9 @@
-using Aki.Reflection.Patching;
-using Comfort.Common;
+using Comfort.Common;
using EFT;
using EFT.Interactive;
using Fika.Core.Coop.Matchmaker;
using Fika.Core.Coop.Players;
+using SPT.Reflection.Patching;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Fika.Core/Coop/Players/CoopBot.cs b/Fika.Core/Coop/Players/CoopBot.cs
index 54e1bb3f..a0b1bb77 100644
--- a/Fika.Core/Coop/Players/CoopBot.cs
+++ b/Fika.Core/Coop/Players/CoopBot.cs
@@ -304,7 +304,7 @@ protected void OnDisable()
public override void OnDestroy()
{
#if DEBUG
- FikaPlugin.Instance.FikaLogger.LogInfo("Destroying " + ProfileId);
+ FikaPlugin.Instance.FikaLogger.LogInfo("Destroying " + ProfileId);
#endif
if (Singleton.Instantiated)
{
diff --git a/Fika.Core/Coop/World/WeatherNode_Patch.cs b/Fika.Core/Coop/World/WeatherNode_Patch.cs
index 9a67d11c..f172f70e 100644
--- a/Fika.Core/Coop/World/WeatherNode_Patch.cs
+++ b/Fika.Core/Coop/World/WeatherNode_Patch.cs
@@ -1,15 +1,15 @@
// © 2024 Lacyway All Rights Reserved
-using Aki.Reflection.Patching;
using EFT.Weather;
using Fika.Core.Coop.Matchmaker;
+using SPT.Reflection.Patching;
using System.Reflection;
namespace Fika.Core.Coop.World
{
internal class WeatherNode_Patch : ModulePatch
{
- protected override MethodBase GetTargetMethod() => typeof(WeatherController).GetMethod(nameof(WeatherController.method_4));
+ protected override MethodBase GetTargetMethod() => typeof(WeatherController).GetMethod(nameof(WeatherController.method_0));
[PatchPostfix]
public static void Postfix(WeatherController __instance, WeatherClass[] nodes)
diff --git a/Fika.Core/EssentialPatches/FikaVersionLabel_Patch.cs b/Fika.Core/EssentialPatches/FikaVersionLabel_Patch.cs
index 5d7f1d23..9572c5a0 100644
--- a/Fika.Core/EssentialPatches/FikaVersionLabel_Patch.cs
+++ b/Fika.Core/EssentialPatches/FikaVersionLabel_Patch.cs
@@ -1,10 +1,10 @@
-using Aki.Common.Http;
-using Aki.Common.Utils;
-using Aki.Custom.Models;
-using Aki.Reflection.Patching;
-using Aki.Reflection.Utils;
-using EFT.UI;
+using EFT.UI;
using HarmonyLib;
+using SPT.Common.Http;
+using SPT.Common.Utils;
+using SPT.Custom.Models;
+using SPT.Reflection.Patching;
+using SPT.Reflection.Utils;
using System.Linq;
using System.Reflection;
diff --git a/Fika.Core/Fika.Core.csproj b/Fika.Core/Fika.Core.csproj
index 717860f3..6c4a640b 100644
--- a/Fika.Core/Fika.Core.csproj
+++ b/Fika.Core/Fika.Core.csproj
@@ -39,22 +39,6 @@
-
- ..\References\aki-custom.dll
- False
-
-
- ..\References\aki-singleplayer.dll
- False
-
-
- ..\References\Aki.Common.dll
- False
-
-
- ..\References\Aki.Reflection.dll
- False
-
..\References\AnimationSystem.Types.dll
False
@@ -97,6 +81,24 @@
..\References\Sirenix.Serialization.dll
False
+
+ ..\References\spt-common.dll
+
+
+ ..\References\spt-core.dll
+
+
+ ..\References\spt-custom.dll
+
+
+ ..\References\spt-debugging.dll
+
+
+ ..\References\spt-reflection.dll
+
+
+ ..\References\spt-singleplayer.dll
+
..\References\Unity.Postprocessing.Runtime.dll
False
diff --git a/Fika.Core/FikaPlugin.cs b/Fika.Core/FikaPlugin.cs
index d351c479..b88f15d4 100644
--- a/Fika.Core/FikaPlugin.cs
+++ b/Fika.Core/FikaPlugin.cs
@@ -1,10 +1,4 @@
using Aki.Custom.Airdrops.Patches;
-using Aki.Custom.BTR.Patches;
-using Aki.Custom.Patches;
-using Aki.SinglePlayer.Patches.MainMenu;
-using Aki.SinglePlayer.Patches.Progression;
-using Aki.SinglePlayer.Patches.Quests;
-using Aki.SinglePlayer.Patches.RaidFix;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
@@ -27,6 +21,13 @@
using Fika.Core.UI.Models;
using Fika.Core.UI.Patches;
using Fika.Core.Utils;
+using SPT.Custom.Airdrops.Patches;
+using SPT.Custom.BTR.Patches;
+using SPT.Custom.Patches;
+using SPT.SinglePlayer.Patches.MainMenu;
+using SPT.SinglePlayer.Patches.Progression;
+using SPT.SinglePlayer.Patches.Quests;
+using SPT.SinglePlayer.Patches.RaidFix;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -46,10 +47,10 @@ namespace Fika.Core
///
[BepInPlugin("com.fika.core", "Fika.Core", "0.9.8906")]
[BepInProcess("EscapeFromTarkov.exe")]
- [BepInDependency("com.spt-aki.custom", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-custom, that way we can disable its patches
- [BepInDependency("com.spt-aki.singleplayer", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-singleplayer, that way we can disable its patches
- [BepInDependency("com.spt-aki.core", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-custom, that way we can disable its patches
- [BepInDependency("com.spt-aki.debugging", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-custom, that way we can disable its patches
+ [BepInDependency("com.SPT.custom", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-custom, that way we can disable its patches
+ [BepInDependency("com.spt.singleplayer", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-singleplayer, that way we can disable its patches
+ [BepInDependency("com.SPT.core", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-custom, that way we can disable its patches
+ [BepInDependency("com.SPT.debugging", BepInDependency.DependencyFlags.HardDependency)] // This is used so that we guarantee to load after aki-custom, that way we can disable its patches
public class FikaPlugin : BaseUnityPlugin
{
///
diff --git a/Fika.Core/Models/BotDifficulties.cs b/Fika.Core/Models/BotDifficulties.cs
index 7ffb9b85..a74d37af 100644
--- a/Fika.Core/Models/BotDifficulties.cs
+++ b/Fika.Core/Models/BotDifficulties.cs
@@ -1,6 +1,6 @@
-using Aki.Common.Http;
-using EFT;
+using EFT;
using Newtonsoft.Json;
+using SPT.Common.Http;
using System.Collections.Generic;
namespace Fika.Core.Models
diff --git a/Fika.Core/Networking/FikaClient.cs b/Fika.Core/Networking/FikaClient.cs
index 8f6fb6d3..8f3c23c7 100644
--- a/Fika.Core/Networking/FikaClient.cs
+++ b/Fika.Core/Networking/FikaClient.cs
@@ -473,7 +473,7 @@ private void OnGenericPacketReceived(GenericPacket packet)
if (!botToEnable.gameObject.activeSelf)
{
#if DEBUG
- clientLogger.LogWarning("Enabling " + packet.BotNetId);
+ clientLogger.LogWarning("Enabling " + packet.BotNetId);
#endif
botToEnable.gameObject.SetActive(true);
}
@@ -491,7 +491,7 @@ private void OnGenericPacketReceived(GenericPacket packet)
if (botToEnable.gameObject.activeSelf)
{
#if DEBUG
- clientLogger.LogWarning("Disabling " + packet.BotNetId);
+ clientLogger.LogWarning("Disabling " + packet.BotNetId);
#endif
botToEnable.gameObject.SetActive(false);
}
diff --git a/Fika.Core/Networking/FikaServer.cs b/Fika.Core/Networking/FikaServer.cs
index b13a4121..ac1f3ac4 100644
--- a/Fika.Core/Networking/FikaServer.cs
+++ b/Fika.Core/Networking/FikaServer.cs
@@ -486,7 +486,7 @@ private void OnInventoryPacketReceived(InventoryPacket packet, NetPeer peer)
using BinaryReader binaryReader = new(memoryStream);
try
{
- GStruct411 result = playerToApply.ToInventoryOperation(binaryReader.ReadPolymorph());
+ GStruct411 result = playerToApply.ToInventoryOperation(binaryReader.ReadPolymorph());
InventoryOperationHandler opHandler = new()
{
diff --git a/Fika.Core/Networking/Fuyu.Platform.Common/Http/FuyuClient.cs b/Fika.Core/Networking/Fuyu.Platform.Common/Http/FuyuClient.cs
index 88515aa6..b466531c 100644
--- a/Fika.Core/Networking/Fuyu.Platform.Common/Http/FuyuClient.cs
+++ b/Fika.Core/Networking/Fuyu.Platform.Common/Http/FuyuClient.cs
@@ -2,7 +2,7 @@
- Using Aki zlib (de-)compression
*/
-using Aki.Common.Utils;
+using SPT.Common.Utils;
using System;
using System.IO;
using System.Net.Http;
diff --git a/Fika.Core/Networking/Http/FikaHttpHandler.cs b/Fika.Core/Networking/Http/FikaHttpHandler.cs
index 28abbce5..8065063d 100644
--- a/Fika.Core/Networking/Http/FikaHttpHandler.cs
+++ b/Fika.Core/Networking/Http/FikaHttpHandler.cs
@@ -1,10 +1,10 @@
-using Aki.Common.Http;
using EFT;
using Fika.Core.Models;
using Fika.Core.Networking.Http.Models;
using Fika.Core.UI.Models;
using Fuyu.Platform.Common.Http;
using Newtonsoft.Json;
+using SPT.Common.Http;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
diff --git a/Fika.Core/Networking/Open.Nat/Utils/Extensions.cs b/Fika.Core/Networking/Open.Nat/Utils/Extensions.cs
index 032f957c..a5c2a795 100644
--- a/Fika.Core/Networking/Open.Nat/Utils/Extensions.cs
+++ b/Fika.Core/Networking/Open.Nat/Utils/Extensions.cs
@@ -149,7 +149,7 @@ public static Task TimeoutAfter(this Task task, TimeS
public static async Task TimeoutAfter(this Task task, TimeSpan timeout)
{
#if DEBUG
- return await task;
+ return await task;
#endif
var timeoutCancellationTokenSource = new CancellationTokenSource();
diff --git a/Fika.Core/Networking/Packets/GameWorld/AirdropPacket.cs b/Fika.Core/Networking/Packets/GameWorld/AirdropPacket.cs
index 268ed6cd..554b7e68 100644
--- a/Fika.Core/Networking/Packets/GameWorld/AirdropPacket.cs
+++ b/Fika.Core/Networking/Packets/GameWorld/AirdropPacket.cs
@@ -1,8 +1,8 @@
// © 2024 Lacyway All Rights Reserved
-using Aki.Custom.Airdrops.Models;
using ComponentAce.Compression.Libs.zlib;
using LiteNetLib.Utils;
+using SPT.Custom.Airdrops.Models;
using UnityEngine;
namespace Fika.Core.Networking
diff --git a/Fika.Core/UI/Patches/DisableInsuranceReadyButton_Patch.cs b/Fika.Core/UI/Patches/DisableInsuranceReadyButton_Patch.cs
index a2ce9500..3e26628c 100644
--- a/Fika.Core/UI/Patches/DisableInsuranceReadyButton_Patch.cs
+++ b/Fika.Core/UI/Patches/DisableInsuranceReadyButton_Patch.cs
@@ -1,7 +1,7 @@
// © 2024 Lacyway All Rights Reserved
-using Aki.Reflection.Patching;
using EFT.UI;
+using SPT.Reflection.Patching;
using System.Reflection;
using UnityEngine;
diff --git a/Fika.Core/UI/Patches/DisableMatchSettingsReadyButton_Patch.cs b/Fika.Core/UI/Patches/DisableMatchSettingsReadyButton_Patch.cs
index a10a62f2..3bf4be04 100644
--- a/Fika.Core/UI/Patches/DisableMatchSettingsReadyButton_Patch.cs
+++ b/Fika.Core/UI/Patches/DisableMatchSettingsReadyButton_Patch.cs
@@ -1,8 +1,8 @@
// © 2024 Lacyway All Rights Reserved
-using Aki.Reflection.Patching;
using EFT.UI;
using EFT.UI.Matchmaker;
+using SPT.Reflection.Patching;
using System.Reflection;
using UnityEngine;
diff --git a/Fika.Core/UI/Patches/DisableReadyButton_Patch.cs b/Fika.Core/UI/Patches/DisableReadyButton_Patch.cs
index a0f2d4cd..b2adb8c3 100644
--- a/Fika.Core/UI/Patches/DisableReadyButton_Patch.cs
+++ b/Fika.Core/UI/Patches/DisableReadyButton_Patch.cs
@@ -1,8 +1,8 @@
// © 2024 Lacyway All Rights Reserved
-using Aki.Reflection.Patching;
using EFT.UI;
using EFT.UI.Matchmaker;
+using SPT.Reflection.Patching;
using System.Reflection;
using UnityEngine;
diff --git a/Fika.Core/UI/Patches/InventoryScroll_Patch.cs b/Fika.Core/UI/Patches/InventoryScroll_Patch.cs
index ff319aeb..2998303e 100644
--- a/Fika.Core/UI/Patches/InventoryScroll_Patch.cs
+++ b/Fika.Core/UI/Patches/InventoryScroll_Patch.cs
@@ -1,5 +1,5 @@
-using Aki.Reflection.Patching;
-using EFT.UI;
+using EFT.UI;
+using SPT.Reflection.Patching;
using System.Reflection;
using UnityEngine.UI;
diff --git a/Fika.Core/UI/Patches/ItemContext_Patch.cs b/Fika.Core/UI/Patches/ItemContext_Patch.cs
index 22e8ff1b..80d51df6 100644
--- a/Fika.Core/UI/Patches/ItemContext_Patch.cs
+++ b/Fika.Core/UI/Patches/ItemContext_Patch.cs
@@ -1,5 +1,4 @@
-using Aki.Reflection.Patching;
-using Comfort.Common;
+using Comfort.Common;
using EFT;
using EFT.InventoryLogic;
using EFT.UI;
@@ -7,6 +6,7 @@
using Fika.Core.Networking.Http;
using Fika.Core.UI.Models;
using HarmonyLib;
+using SPT.Reflection.Patching;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
@@ -32,7 +32,7 @@ private static void Prefix(ItemInfoInteractionsAbstractClass co
return;
}
- ItemContextAbstractClass itemContext = Traverse.Create(contextInteractions).Field("gclass2813_0").Value;
+ ItemContextAbstractClass itemContext = Traverse.Create(contextInteractions).Field("gclass2826_0").Value;
if (itemContext.ViewType == EItemViewType.Inventory)
{
if (Singleton.Instantiated && Singleton.Instance is not HideoutGameWorld)
@@ -57,17 +57,17 @@ private static void Prefix(ItemInfoInteractionsAbstractClass co
Dictionary dynamicInteractions = Traverse.Create(contextInteractions).Field>("dictionary_0").Value;
if (dynamicInteractions == null)
{
- dynamicInteractions = new Dictionary();
+ dynamicInteractions = [];
}
dynamicInteractions["SEND"] = new("SEND", "SEND", () =>
{
- var body = new AvailableReceiversRequest(itemContext.Item.Id);
- var availableUsers = FikaRequestHandler.AvailableReceivers(body);
+ AvailableReceiversRequest body = new(itemContext.Item.Id);
+ Dictionary availableUsers = FikaRequestHandler.AvailableReceivers(body);
// convert availableUsers.Keys
List optionDatas = [];
- foreach (var user in availableUsers.Keys)
+ foreach (string user in availableUsers.Keys)
{
optionDatas.Add(new()
{
diff --git a/Fika.Core/UI/Patches/TOS_Patch.cs b/Fika.Core/UI/Patches/TOS_Patch.cs
index ad221cb2..a89f248a 100644
--- a/Fika.Core/UI/Patches/TOS_Patch.cs
+++ b/Fika.Core/UI/Patches/TOS_Patch.cs
@@ -1,7 +1,7 @@
-using Aki.Reflection.Patching;
-using Comfort.Common;
+using Comfort.Common;
using EFT;
using EFT.UI;
+using SPT.Reflection.Patching;
using System;
using System.Reflection;
using System.Text;