From aae9613fcadace6171daf7fdd257f4bcf3fefdd5 Mon Sep 17 00:00:00 2001 From: Misfiy <85962933+obvEve@users.noreply.github.com> Date: Tue, 6 Jan 2026 14:53:37 +0100 Subject: [PATCH 1/4] 3.0 --- SecretAPI.Examples/ExampleEntry.cs | 1 - SecretAPI/Extensions/CollectionExtensions.cs | 51 ++++---- SecretAPI/Extensions/HarmonyExtensions.cs | 85 ++++++------- SecretAPI/Extensions/MirrorExtensions.cs | 20 ---- SecretAPI/Extensions/PlayerExtensions.cs | 120 +++++++++---------- SecretAPI/Extensions/RoleExtensions.cs | 57 --------- SecretAPI/SecretAPI.csproj | 3 + 7 files changed, 130 insertions(+), 207 deletions(-) delete mode 100644 SecretAPI/Extensions/RoleExtensions.cs diff --git a/SecretAPI.Examples/ExampleEntry.cs b/SecretAPI.Examples/ExampleEntry.cs index 7381b08..32ee205 100644 --- a/SecretAPI.Examples/ExampleEntry.cs +++ b/SecretAPI.Examples/ExampleEntry.cs @@ -5,7 +5,6 @@ using HarmonyLib; using LabApi.Loader.Features.Plugins; using SecretAPI.Examples.Settings; - using SecretAPI.Extensions; using SecretAPI.Features.UserSettings; /// diff --git a/SecretAPI/Extensions/CollectionExtensions.cs b/SecretAPI/Extensions/CollectionExtensions.cs index 28e1887..83af57e 100644 --- a/SecretAPI/Extensions/CollectionExtensions.cs +++ b/SecretAPI/Extensions/CollectionExtensions.cs @@ -11,37 +11,38 @@ /// public static class CollectionExtensions { - /// - /// Gets a random value from the collection. - /// /// The collection to pull from. /// The Type contained by the collection. - /// A random value, default value when empty collection. - /// Will occur if the collection is empty. - public static T GetRandomValue(this IEnumerable collection) + extension(IEnumerable collection) { - TryGetRandomValue(collection, out T? value); - return value!; - } - - /// - /// Tries to get a random value from . - /// - /// The to try and get a random value from. - /// The value that was found. Default if none could be found. - /// The type contained within the . - /// Whether a non-null value was found. - public static bool TryGetRandomValue(this IEnumerable collection, [NotNullWhen(true)] out T? value) - { - IList list = collection as IList ?? collection.ToList(); - if (list.Count == 0) + /// + /// Gets a random value from the collection. + /// + /// A random value, default value when empty collection. + /// Will occur if the collection is empty. + public T GetRandomValue() { - value = default; - return false; + TryGetRandomValue(collection, out T? value); + return value!; } - value = list[Random.Range(0, list.Count)]; - return value != null; + /// + /// Tries to get a random value from . + /// + /// The value that was found. Default if none could be found. + /// Whether a non-null value was found. + public bool TryGetRandomValue([NotNullWhen(true)] out T? value) + { + IList list = collection as IList ?? collection.ToList(); + if (list.Count == 0) + { + value = default; + return false; + } + + value = list[Random.Range(0, list.Count)]; + return value != null; + } } } } \ No newline at end of file diff --git a/SecretAPI/Extensions/HarmonyExtensions.cs b/SecretAPI/Extensions/HarmonyExtensions.cs index 2f623b1..29d7451 100644 --- a/SecretAPI/Extensions/HarmonyExtensions.cs +++ b/SecretAPI/Extensions/HarmonyExtensions.cs @@ -13,55 +13,56 @@ /// public static class HarmonyExtensions { - /// - /// Patches all methods with the proper . - /// /// The harmony to use for the patch. - /// The category to patch. - /// The assembly to find patches in. - public static void PatchCategory(this Harmony harmony, string category, Assembly? assembly = null) + extension(Harmony harmony) { - assembly ??= Assembly.GetCallingAssembly(); - - assembly.GetTypes().Where(type => - { - IEnumerable categories = type.GetCustomAttributes(); - return categories.Any(c => c.Category == category); - }) - .Do(type => SafePatch(harmony, type)); - } - - /// - /// Patches all patches that don't have a . - /// - /// The harmony to use for the patch. - /// The assembly to look for patches. - public static void PatchAllNoCategory(this Harmony harmony, Assembly? assembly = null) - { - assembly ??= Assembly.GetCallingAssembly(); + /// + /// Patches all methods with the proper . + /// + /// The category to patch. + /// The assembly to find patches in. + public void PatchCategory(string category, Assembly? assembly = null) + { + assembly ??= Assembly.GetCallingAssembly(); - assembly.GetTypes().Where(type => - { - IEnumerable categories = type.GetCustomAttributes(); - return !categories.Any(); - }) - .Do(type => SafePatch(harmony, type)); - } + assembly.GetTypes().Where(type => + { + IEnumerable categories = type.GetCustomAttributes(); + return categories.Any(c => c.Category == category); + }) + .Do(type => SafePatch(harmony, type)); + } - /// - /// Attempts to safely patch a , logging any errors. - /// - /// The harmony to use for the patch. - /// The to attempt to patch. - public static void SafePatch(this Harmony harmony, Type type) - { - try + /// + /// Patches all patches that don't have a . + /// + /// The assembly to look for patches. + public void PatchAllNoCategory(Assembly? assembly = null) { - harmony.CreateClassProcessor(type).Patch(); + assembly ??= Assembly.GetCallingAssembly(); + + assembly.GetTypes().Where(type => + { + IEnumerable categories = type.GetCustomAttributes(); + return !categories.Any(); + }) + .Do(type => SafePatch(harmony, type)); } - catch (Exception ex) + + /// + /// Attempts to safely patch a , logging any errors. + /// + /// The to attempt to patch. + public void SafePatch(Type type) { - Logger.Error($"[HarmonyExtensions] failed to safely patch {harmony.Id} ({type.FullName}): {ex}"); + try + { + harmony.CreateClassProcessor(type).Patch(); + } + catch (Exception ex) + { + Logger.Error($"[HarmonyExtensions] failed to safely patch {harmony.Id} ({type.FullName}): {ex}"); + } } } } diff --git a/SecretAPI/Extensions/MirrorExtensions.cs b/SecretAPI/Extensions/MirrorExtensions.cs index 126321e..30aea4e 100644 --- a/SecretAPI/Extensions/MirrorExtensions.cs +++ b/SecretAPI/Extensions/MirrorExtensions.cs @@ -11,26 +11,6 @@ /// public static class MirrorExtensions { - /// - /// Sends a fake cassie message to a player. - /// - /// The target to send the cassie message to. - /// The message to send. - /// Whether the cassie is held. - /// Whether the cassie is noisy. - /// Whether there is subtitles on the cassie. - /// The custom subtitles to use for the cassie. - [Obsolete("Due to NW changes to Cassie, this is no longer functional.")] - public static void SendFakeCassieMessage( - this Player target, - string message, - bool isHeld = false, - bool isNoisy = true, - bool isSubtitles = true, - string customSubtitles = "") - { - } - /// /// Send a fake rpc message to a player. /// diff --git a/SecretAPI/Extensions/PlayerExtensions.cs b/SecretAPI/Extensions/PlayerExtensions.cs index 032b3bf..d2a6737 100644 --- a/SecretAPI/Extensions/PlayerExtensions.cs +++ b/SecretAPI/Extensions/PlayerExtensions.cs @@ -2,9 +2,6 @@ { using CustomPlayerEffects; using Interactables.Interobjects.DoorUtils; - using InventorySystem; - using InventorySystem.Items; - using InventorySystem.Items.Usables.Scp330; using LabApi.Features.Wrappers; using SecretAPI.Enums; @@ -13,74 +10,73 @@ /// public static class PlayerExtensions { - /// - /// Gets an effect of a player based on the effect name. - /// /// The player to get effect from. - /// Name of the effect to find. - /// The effect. - public static StatusEffectBase GetEffect(this Player player, string name) - => player.ReferenceHub.playerEffectsController.TryGetEffect(name, out StatusEffectBase? effect) ? effect : null!; - - /// - /// Checks whether a player has permission to access a . - /// - /// The player to check. - /// The requester to check for permissions. - /// The to use for checking if a player has it. - /// Whether a valid permission was found. - public static bool HasDoorPermission(this Player player, IDoorPermissionRequester requester, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) + extension(Player player) { - if (checkFlags.HasFlag(DoorPermissionCheck.Bypass) && player.IsBypassEnabled) - return true; - - if (checkFlags.HasFlag(DoorPermissionCheck.Role) && player.RoleBase is IDoorPermissionProvider roleProvider && requester.PermissionsPolicy.CheckPermissions(roleProvider.GetPermissions(requester))) - return true; + /// + /// Gets an effect of a player based on the effect name. + /// + /// Name of the effect to find. + /// The effect. + public StatusEffectBase GetEffect(string name) + => player.ReferenceHub.playerEffectsController.TryGetEffect(name, out StatusEffectBase? effect) ? effect : null!; - foreach (Item item in player.Items) + /// + /// Checks whether a player has permission to access a . + /// + /// The requester to check for permissions. + /// The to use for checking if a player has it. + /// Whether a valid permission was found. + public bool HasDoorPermission(IDoorPermissionRequester requester, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) { - bool isCurrent = item == player.CurrentItem; - if (!checkFlags.HasFlag(DoorPermissionCheck.CurrentItem) && isCurrent) - continue; - - if (!checkFlags.HasFlag(DoorPermissionCheck.InventoryExcludingCurrent) && !isCurrent) - continue; + if (checkFlags.HasFlag(DoorPermissionCheck.Bypass) && player.IsBypassEnabled) + return true; - if (item.Base is IDoorPermissionProvider itemProvider && requester.PermissionsPolicy.CheckPermissions(itemProvider.GetPermissions(requester))) + if (checkFlags.HasFlag(DoorPermissionCheck.Role) && player.RoleBase is IDoorPermissionProvider roleProvider && requester.PermissionsPolicy.CheckPermissions(roleProvider.GetPermissions(requester))) return true; - } - return false; - } + foreach (Item item in player.Items) + { + bool isCurrent = item == player.CurrentItem; + if (!checkFlags.HasFlag(DoorPermissionCheck.CurrentItem) && isCurrent) + continue; - /// - /// Checks whether a player has permission to access a . - /// - /// The player to check. - /// The door to check for permissions. - /// The to use for checking if a player has it. - /// Whether a valid permission was found. - public static bool HasDoorPermission(this Player player, Door door, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) - => player.HasDoorPermission(door.Base, checkFlags); + if (!checkFlags.HasFlag(DoorPermissionCheck.InventoryExcludingCurrent) && !isCurrent) + continue; - /// - /// Checks whether a player has permission to access a . - /// - /// The player to check. - /// The locker chamber to check for permissions. - /// The to use for checking if a player has it. - /// Whether a valid permission was found. - public static bool HasLockerChamberPermission(this Player player, LockerChamber chamber, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) - => player.HasDoorPermission(chamber.Base, checkFlags); + if (item.Base is IDoorPermissionProvider itemProvider && requester.PermissionsPolicy.CheckPermissions(itemProvider.GetPermissions(requester))) + return true; + } - /// - /// Checks whether a player has permission to access a . - /// - /// The player to check. - /// The generator to check for permissions. - /// The to use for checking if a player has it. - /// Whether a valid permission was found. - public static bool HasGeneratorPermission(this Player player, Generator generator, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) - => player.HasDoorPermission(generator.Base, checkFlags); + return false; + } + + /// + /// Checks whether a player has permission to access a . + /// + /// The door to check for permissions. + /// The to use for checking if a player has it. + /// Whether a valid permission was found. + public bool HasDoorPermission(Door door, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) + => player.HasDoorPermission(door.Base, checkFlags); + + /// + /// Checks whether a player has permission to access a . + /// + /// The locker chamber to check for permissions. + /// The to use for checking if a player has it. + /// Whether a valid permission was found. + public bool HasLockerChamberPermission(LockerChamber chamber, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) + => player.HasDoorPermission(chamber.Base, checkFlags); + + /// + /// Checks whether a player has permission to access a . + /// + /// The generator to check for permissions. + /// The to use for checking if a player has it. + /// Whether a valid permission was found. + public bool HasGeneratorPermission(Generator generator, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default) + => player.HasDoorPermission(generator.Base, checkFlags); + } } } \ No newline at end of file diff --git a/SecretAPI/Extensions/RoleExtensions.cs b/SecretAPI/Extensions/RoleExtensions.cs deleted file mode 100644 index e436281..0000000 --- a/SecretAPI/Extensions/RoleExtensions.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace SecretAPI.Extensions -{ - using System; - using System.Diagnostics.CodeAnalysis; - using InventorySystem; - using LabApi.Features.Extensions; - using PlayerRoles; - using Respawning.Objectives; - using UnityEngine; - - /// - /// Extensions related to . - /// - [Obsolete("This no longer provides anything that basegame/LabAPI does not")] - public static class RoleExtensions - { - /// - /// Tries to get a role base from a . - /// - /// The to get base of. - /// The found. - /// The . - /// The role base found, else null. - [Obsolete("Use LabApi.Features.Extensions.RoleExtensions.TryGetRoleBase")] - public static bool TryGetRoleBase(this RoleTypeId roleTypeId, [NotNullWhen(true)] out T? role) - => LabApi.Features.Extensions.RoleExtensions.TryGetRoleBase(roleTypeId, out role); - - /// - /// Gets the color of a . - /// - /// The role to get color of. - /// The color found, if not found then white. - [Obsolete("Use Respawning.Objectives.GetRoleColor")] - public static Color GetColor(this RoleTypeId roleTypeId) - => roleTypeId.GetRoleColor(); - - /// - /// Tries to get a random spawn point from a . - /// - /// The role to get spawn from. - /// The position found. - /// The rotation found. - /// Whether a spawnpoint was found. - [Obsolete("Use LabApi.Features.Extensions.RoleExtensions.TryGetRandomSpawnPoint")] - public static bool GetRandomSpawnPosition(this RoleTypeId role, out Vector3 position, out float horizontalRot) - => role.TryGetRandomSpawnPoint(out position, out horizontalRot); - - /// - /// Gets the inventory of the specified . - /// - /// The . - /// The found. - [Obsolete("Use LabApi.Features.Extensions.RoleExtensions.GetInventory")] - public static InventoryRoleInfo GetInventory(this RoleTypeId role) - => LabApi.Features.Extensions.RoleExtensions.GetInventory(role); - } -} \ No newline at end of file diff --git a/SecretAPI/SecretAPI.csproj b/SecretAPI/SecretAPI.csproj index ba3d4b3..c4335e7 100644 --- a/SecretAPI/SecretAPI.csproj +++ b/SecretAPI/SecretAPI.csproj @@ -29,13 +29,16 @@ + + From 22ec81f241ae790e5a1ae8ed20945880e7f41a21 Mon Sep 17 00:00:00 2001 From: evelyn <85962933+Misfiy@users.noreply.github.com> Date: Wed, 7 Jan 2026 09:27:51 +0100 Subject: [PATCH 2/4] Update Attribute to Attributes namespace --- SecretAPI.Examples/Patches/ExamplePatch.cs | 2 +- SecretAPI/{Attribute => Attributes}/CallOnLoadAttribute.cs | 2 +- SecretAPI/{Attribute => Attributes}/CallOnUnloadAttribute.cs | 2 +- SecretAPI/{Attribute => Attributes}/HarmonyPatchCategory.cs | 2 +- SecretAPI/Extensions/HarmonyExtensions.cs | 2 +- SecretAPI/Patches/Features/SendSettingsPlayerSync.cs | 2 +- SecretAPI/Patches/Features/SendSettingsServerSync.cs | 2 +- SecretAPI/Patches/Features/SettingsOriginalDefinitionFix.cs | 2 +- SecretAPI/Patches/Features/SettingsSyncValidateFix.cs | 2 +- SecretAPI/SecretApi.cs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) rename SecretAPI/{Attribute => Attributes}/CallOnLoadAttribute.cs (98%) rename SecretAPI/{Attribute => Attributes}/CallOnUnloadAttribute.cs (97%) rename SecretAPI/{Attribute => Attributes}/HarmonyPatchCategory.cs (95%) diff --git a/SecretAPI.Examples/Patches/ExamplePatch.cs b/SecretAPI.Examples/Patches/ExamplePatch.cs index fde590e..167939b 100644 --- a/SecretAPI.Examples/Patches/ExamplePatch.cs +++ b/SecretAPI.Examples/Patches/ExamplePatch.cs @@ -1,6 +1,6 @@ namespace SecretAPI.Examples.Patches { - using SecretAPI.Attribute; + using SecretAPI.Attributes; /// /// An example harmony patch. diff --git a/SecretAPI/Attribute/CallOnLoadAttribute.cs b/SecretAPI/Attributes/CallOnLoadAttribute.cs similarity index 98% rename from SecretAPI/Attribute/CallOnLoadAttribute.cs rename to SecretAPI/Attributes/CallOnLoadAttribute.cs index cb55356..32bcd34 100644 --- a/SecretAPI/Attribute/CallOnLoadAttribute.cs +++ b/SecretAPI/Attributes/CallOnLoadAttribute.cs @@ -1,4 +1,4 @@ -namespace SecretAPI.Attribute +namespace SecretAPI.Attributes { using System; using System.Collections.Generic; diff --git a/SecretAPI/Attribute/CallOnUnloadAttribute.cs b/SecretAPI/Attributes/CallOnUnloadAttribute.cs similarity index 97% rename from SecretAPI/Attribute/CallOnUnloadAttribute.cs rename to SecretAPI/Attributes/CallOnUnloadAttribute.cs index b886d55..65da120 100644 --- a/SecretAPI/Attribute/CallOnUnloadAttribute.cs +++ b/SecretAPI/Attributes/CallOnUnloadAttribute.cs @@ -1,4 +1,4 @@ -namespace SecretAPI.Attribute +namespace SecretAPI.Attributes { using System; using System.Reflection; diff --git a/SecretAPI/Attribute/HarmonyPatchCategory.cs b/SecretAPI/Attributes/HarmonyPatchCategory.cs similarity index 95% rename from SecretAPI/Attribute/HarmonyPatchCategory.cs rename to SecretAPI/Attributes/HarmonyPatchCategory.cs index a27b953..853129d 100644 --- a/SecretAPI/Attribute/HarmonyPatchCategory.cs +++ b/SecretAPI/Attributes/HarmonyPatchCategory.cs @@ -1,4 +1,4 @@ -namespace SecretAPI.Attribute +namespace SecretAPI.Attributes { using System; using SecretAPI.Extensions; diff --git a/SecretAPI/Extensions/HarmonyExtensions.cs b/SecretAPI/Extensions/HarmonyExtensions.cs index 29d7451..f26b436 100644 --- a/SecretAPI/Extensions/HarmonyExtensions.cs +++ b/SecretAPI/Extensions/HarmonyExtensions.cs @@ -6,7 +6,7 @@ using System.Reflection; using HarmonyLib; using LabApi.Features.Console; - using SecretAPI.Attribute; + using SecretAPI.Attributes; /// /// Handles patching. diff --git a/SecretAPI/Patches/Features/SendSettingsPlayerSync.cs b/SecretAPI/Patches/Features/SendSettingsPlayerSync.cs index dcc3c58..d7b94cb 100644 --- a/SecretAPI/Patches/Features/SendSettingsPlayerSync.cs +++ b/SecretAPI/Patches/Features/SendSettingsPlayerSync.cs @@ -2,7 +2,7 @@ { using HarmonyLib; using LabApi.Features.Wrappers; - using SecretAPI.Attribute; + using SecretAPI.Attributes; using SecretAPI.Features.UserSettings; using UserSettings.ServerSpecific; diff --git a/SecretAPI/Patches/Features/SendSettingsServerSync.cs b/SecretAPI/Patches/Features/SendSettingsServerSync.cs index cb2fd52..e84d1ff 100644 --- a/SecretAPI/Patches/Features/SendSettingsServerSync.cs +++ b/SecretAPI/Patches/Features/SendSettingsServerSync.cs @@ -1,7 +1,7 @@ namespace SecretAPI.Patches.Features { using HarmonyLib; - using SecretAPI.Attribute; + using SecretAPI.Attributes; using SecretAPI.Features.UserSettings; using UserSettings.ServerSpecific; diff --git a/SecretAPI/Patches/Features/SettingsOriginalDefinitionFix.cs b/SecretAPI/Patches/Features/SettingsOriginalDefinitionFix.cs index f17b81c..a1b1e74 100644 --- a/SecretAPI/Patches/Features/SettingsOriginalDefinitionFix.cs +++ b/SecretAPI/Patches/Features/SettingsOriginalDefinitionFix.cs @@ -1,7 +1,7 @@ namespace SecretAPI.Patches.Features { using HarmonyLib; - using SecretAPI.Attribute; + using SecretAPI.Attributes; using SecretAPI.Features.UserSettings; using UserSettings.ServerSpecific; diff --git a/SecretAPI/Patches/Features/SettingsSyncValidateFix.cs b/SecretAPI/Patches/Features/SettingsSyncValidateFix.cs index 89e08a9..39cf781 100644 --- a/SecretAPI/Patches/Features/SettingsSyncValidateFix.cs +++ b/SecretAPI/Patches/Features/SettingsSyncValidateFix.cs @@ -1,7 +1,7 @@ namespace SecretAPI.Patches.Features { using HarmonyLib; - using SecretAPI.Attribute; + using SecretAPI.Attributes; using SecretAPI.Features.UserSettings; using UserSettings.ServerSpecific; diff --git a/SecretAPI/SecretApi.cs b/SecretAPI/SecretApi.cs index 6272099..72634a7 100644 --- a/SecretAPI/SecretApi.cs +++ b/SecretAPI/SecretApi.cs @@ -6,7 +6,7 @@ using LabApi.Features; using LabApi.Loader.Features.Plugins; using LabApi.Loader.Features.Plugins.Enums; - using SecretAPI.Attribute; + using SecretAPI.Attributes; /// /// Main class handling loading API. From b544af7cb45f62b0faaceb0957bf2490b7dd7879 Mon Sep 17 00:00:00 2001 From: evelyn <85962933+Misfiy@users.noreply.github.com> Date: Wed, 7 Jan 2026 09:31:11 +0100 Subject: [PATCH 3/4] Namespace fix --- SecretAPI/Features/Effects/CustomPlayerEffect.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecretAPI/Features/Effects/CustomPlayerEffect.cs b/SecretAPI/Features/Effects/CustomPlayerEffect.cs index 6231060..8f9b080 100644 --- a/SecretAPI/Features/Effects/CustomPlayerEffect.cs +++ b/SecretAPI/Features/Effects/CustomPlayerEffect.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using CustomPlayerEffects; using LabApi.Features.Wrappers; - using SecretAPI.Attribute; + using SecretAPI.Attributes; using SecretAPI.Extensions; using UnityEngine; using UnityEngine.SceneManagement; From 6c765bd48303869a68f01e506094ff03c997587a Mon Sep 17 00:00:00 2001 From: Misfiy <85962933+obvEve@users.noreply.github.com> Date: Sun, 18 Jan 2026 20:42:41 +0100 Subject: [PATCH 4/4] Change DoorPermissionCheck to use bitwise --- SecretAPI/Enums/DoorPermissionCheck.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SecretAPI/Enums/DoorPermissionCheck.cs b/SecretAPI/Enums/DoorPermissionCheck.cs index 0070b60..ad78cac 100644 --- a/SecretAPI/Enums/DoorPermissionCheck.cs +++ b/SecretAPI/Enums/DoorPermissionCheck.cs @@ -21,22 +21,22 @@ public enum DoorPermissionCheck /// /// Used to consider . /// - Bypass = 1, + Bypass = 1 << 0, /// /// Used to consider the player's . /// - Role = 2, + Role = 1 << 1, /// /// Used to consider the player's . /// - CurrentItem = 4, + CurrentItem = 1 << 2, /// /// Used to consider the player's inventory, not including the item they are holding. /// - InventoryExcludingCurrent = 8, + InventoryExcludingCurrent = 1 << 3, /// /// Used to consider the player's ENTIRE inventory.