From 9e35049e441e99e75bc4d3444ea4309ec16af8f2 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 17 Nov 2024 16:00:48 +0000 Subject: [PATCH] Patch comment changes --- .../Patches/ScavMode/FixSavageInventoryScreenPatch.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/project/SPT.SinglePlayer/Patches/ScavMode/FixSavageInventoryScreenPatch.cs b/project/SPT.SinglePlayer/Patches/ScavMode/FixSavageInventoryScreenPatch.cs index fc2908f..0588a6b 100644 --- a/project/SPT.SinglePlayer/Patches/ScavMode/FixSavageInventoryScreenPatch.cs +++ b/project/SPT.SinglePlayer/Patches/ScavMode/FixSavageInventoryScreenPatch.cs @@ -30,7 +30,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode } /// /// Get profile from other patch (GetProfileAtEndOfRaidPatch) - /// if our profile is savage Create new Session.AllProfiles and pass in our own profile to allow us to use the ScavengerInventoryScreen + /// If our profile is savage Create new Session.AllProfiles and pass in our own profile to allow us to use the ScavengerInventoryScreen /// public class FixSavageInventoryScreenPatch : ModulePatch { @@ -44,11 +44,13 @@ namespace SPT.SinglePlayer.Patches.ScavMode { Profile profile = new(GetProfileAtEndOfRaidPatch.ProfileDescriptor); + // Player is PMC, skip patch if (profile.Side != EPlayerSide.Savage) { return; } - + + // Only do below when player is a scav var session = (ProfileEndpointFactoryAbstractClass)___iSession; session.AllProfiles = [ @@ -57,7 +59,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode ]; session.ProfileOfPet.LearnAll(); - // make a request to the server, so it knows of the items we might transfer + // Send scav profile to server so it knows of the items we might transfer RequestHandler.PutJson("/raid/profile/scavsave", GetProfileAtEndOfRaidPatch.ProfileDescriptor.ToUnparsedData([]).JObject.ToString()); }