From d37c38b2b969d4821603d9463284c09b942b6eb1 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 3 Oct 2024 10:28:48 +0100 Subject: [PATCH] Add return comments --- project/SPT.Core/Patches/BattlEyePatch.cs | 2 +- project/SPT.Core/Patches/ConsistencyMultiPatch.cs | 2 +- project/SPT.Core/Patches/ConsistencySinglePatch.cs | 2 +- project/SPT.Custom/Patches/BetaLogoPatch.cs | 3 +-- project/SPT.Custom/Patches/BotDifficultyPatch.cs | 4 +++- .../SPT.Custom/Patches/DisableGameModeAdjustButtonPatch.cs | 2 +- project/SPT.Custom/Patches/EasyAssetsPatch.cs | 2 +- .../Patches/FixScavWarNullErrorWithMarkOfUnknownPatch.cs | 2 +- project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs | 2 +- .../Patches/RaidFix/GetNewBotTemplatesPatch.cs | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/project/SPT.Core/Patches/BattlEyePatch.cs b/project/SPT.Core/Patches/BattlEyePatch.cs index d2142ed..ad4723f 100644 --- a/project/SPT.Core/Patches/BattlEyePatch.cs +++ b/project/SPT.Core/Patches/BattlEyePatch.cs @@ -18,7 +18,7 @@ namespace SPT.Core.Patches { ___bool_0 = ValidationUtil.Validate(); __result = Task.CompletedTask; - return false; + return false; // Skip original } } } diff --git a/project/SPT.Core/Patches/ConsistencyMultiPatch.cs b/project/SPT.Core/Patches/ConsistencyMultiPatch.cs index 094e599..f534f08 100644 --- a/project/SPT.Core/Patches/ConsistencyMultiPatch.cs +++ b/project/SPT.Core/Patches/ConsistencyMultiPatch.cs @@ -19,7 +19,7 @@ namespace SPT.Core.Patches private static bool PatchPrefix(ref object __result) { __result = Task.FromResult(new FakeFileCheckerResult()); - return false; + return false; // Skip original } } } diff --git a/project/SPT.Core/Patches/ConsistencySinglePatch.cs b/project/SPT.Core/Patches/ConsistencySinglePatch.cs index a0dfccc..e48d1e0 100644 --- a/project/SPT.Core/Patches/ConsistencySinglePatch.cs +++ b/project/SPT.Core/Patches/ConsistencySinglePatch.cs @@ -20,7 +20,7 @@ namespace SPT.Core.Patches { __result = Task.FromResult(new FakeFileCheckerResult()); - return false; + return false; // Skip original } } } diff --git a/project/SPT.Custom/Patches/BetaLogoPatch.cs b/project/SPT.Custom/Patches/BetaLogoPatch.cs index 2d1bf2a..4bb9425 100644 --- a/project/SPT.Custom/Patches/BetaLogoPatch.cs +++ b/project/SPT.Custom/Patches/BetaLogoPatch.cs @@ -68,8 +68,7 @@ namespace SPT.Custom.Patches __result = new Vector2(newX, newY); - // Skip original - return false; + return false; // Skip original } } } diff --git a/project/SPT.Custom/Patches/BotDifficultyPatch.cs b/project/SPT.Custom/Patches/BotDifficultyPatch.cs index 33678ac..0fb88ff 100644 --- a/project/SPT.Custom/Patches/BotDifficultyPatch.cs +++ b/project/SPT.Custom/Patches/BotDifficultyPatch.cs @@ -26,9 +26,11 @@ namespace SPT.Custom.Patches if (resultIsNullEmpty) { ConsoleScreen.LogError($"Unable to get difficulty settings for {role} {botDifficulty}"); + + return true; // Do original method } - return resultIsNullEmpty; // Server data returned = false = skip original method + return false; // Skip original } } } diff --git a/project/SPT.Custom/Patches/DisableGameModeAdjustButtonPatch.cs b/project/SPT.Custom/Patches/DisableGameModeAdjustButtonPatch.cs index a654d46..a277e7a 100644 --- a/project/SPT.Custom/Patches/DisableGameModeAdjustButtonPatch.cs +++ b/project/SPT.Custom/Patches/DisableGameModeAdjustButtonPatch.cs @@ -21,7 +21,7 @@ namespace SPT.Custom.Patches public static bool PatchPrefix(ESessionMode sessionMode, Profile profile, ref GameObject ____notAvailableState) { ____notAvailableState.SetActive(false); - return false; + return false; // Skip original } } } diff --git a/project/SPT.Custom/Patches/EasyAssetsPatch.cs b/project/SPT.Custom/Patches/EasyAssetsPatch.cs index cf7477a..25ca265 100644 --- a/project/SPT.Custom/Patches/EasyAssetsPatch.cs +++ b/project/SPT.Custom/Patches/EasyAssetsPatch.cs @@ -46,7 +46,7 @@ namespace SPT.Custom.Patches var easyAsset = gameObject.AddComponent(); __result = Init(easyAsset, bundleLock, defaultKey, rootPath, platformName, shouldExclude, bundleCheck); - return false; + return false; // Skip original } private static async Task Init(EasyAssets instance, [CanBeNull] IBundleLock bundleLock, string defaultKey, string rootPath, string platformName, [CanBeNull] Func shouldExclude, Func bundleCheck) diff --git a/project/SPT.Custom/Patches/FixScavWarNullErrorWithMarkOfUnknownPatch.cs b/project/SPT.Custom/Patches/FixScavWarNullErrorWithMarkOfUnknownPatch.cs index 642d6e0..5760168 100644 --- a/project/SPT.Custom/Patches/FixScavWarNullErrorWithMarkOfUnknownPatch.cs +++ b/project/SPT.Custom/Patches/FixScavWarNullErrorWithMarkOfUnknownPatch.cs @@ -18,7 +18,7 @@ namespace SPT.Custom.Patches { if (____groups == null) { - return false; + return false; // Skip original } return true; // Do original method } diff --git a/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs b/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs index 2d972f7..8a4d5bf 100644 --- a/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs +++ b/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs @@ -93,7 +93,7 @@ namespace SPT.Debugging.Patches __instance.SpawnBotsInZoneOnPositions(newSpawns.GetRange(i, 1), currentZone, currentSpawnData); } - return false; + return false; // Skip original } } } \ No newline at end of file diff --git a/project/SPT.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs b/project/SPT.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs index c0e1847..425572f 100644 --- a/project/SPT.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs +++ b/project/SPT.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs @@ -77,7 +77,7 @@ namespace SPT.SinglePlayer.Patches.RaidFix var continuation = new BundleLoader(taskScheduler); __result = taskAwaiter.ContinueWith(continuation.LoadBundles, taskScheduler).Unwrap(); - return false; + return false; // Skip original } private static Profile GetFirstResult(Task task)