From d5b8378f63a734aba4331cdfe8fcb54267911a81 Mon Sep 17 00:00:00 2001 From: Evgencheg <73418250+Evgencheg@users.noreply.github.com> Date: Thu, 17 Oct 2024 02:02:31 +0300 Subject: [PATCH] Update CharacterRequirements.Profile.cs --- .../Systems/CharacterRequirements.Profile.cs | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs index 02c3eeb352..58f25780b8 100644 --- a/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs +++ b/Content.Shared/Customization/Systems/CharacterRequirements.Profile.cs @@ -386,12 +386,7 @@ public sealed partial class CharacterSponsorRequirement : CharacterRequirement public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, IPrototype prototype, IEntityManager entityManager, IPrototypeManager prototypeManager, IConfigurationManager configManager, - out FormattedMessage? reason, int depth = 0) => IsValid(job, profile, playTimes, whitelisted, prototype, entityManager, prototypeManager, configManager, out reason, depth, 0); - - public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile, - Dictionary playTimes, bool whitelisted, IPrototype prototype, - IEntityManager entityManager, IPrototypeManager prototypeManager, IConfigurationManager configManager, - out FormattedMessage? reason, int depth = 0, int sponsorTier = 0) + out FormattedMessage? reason, int depth = 0, int sponsorTier = 0, int uuid = "") { reason = null; return sponsorTier >= Min && sponsorTier <= Max; @@ -411,21 +406,10 @@ public sealed partial class CharacterUUIDRequirement : CharacterRequirement public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile, Dictionary playTimes, bool whitelisted, IPrototype prototype, IEntityManager entityManager, IPrototypeManager prototypeManager, IConfigurationManager configManager, - out FormattedMessage? reason, int depth = 0) => IsValid(job, profile, playTimes, whitelisted, prototype, entityManager, prototypeManager, configManager, out reason, depth, 0); - - public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile, - Dictionary playTimes, bool whitelisted, IPrototype prototype, - IEntityManager entityManager, IPrototypeManager prototypeManager, IConfigurationManager configManager, - out FormattedMessage? reason, int depth = 0, int sponsorTier = 0) + out FormattedMessage? reason, int depth = 0, int sponsorTier = 0, int uuid = "") { reason = null; - var filter = Filter.GetAllPlayers(); - foreach (var player in filter) - { - if (player.UserId.ToString() == Uuid) - return true; - } - return false; + return uuid == Uuid; } } #endif