From: ScarKy0 Date: Thu, 14 Nov 2024 16:53:15 +0000 (+0100) Subject: Yippee! X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=ace158df0e5e335f8e7897ffe6f93f8ac8448865;p=space-station-14.git Yippee! --- diff --git a/Content.Server/Silicons/Laws/SiliconLawSystem.cs b/Content.Server/Silicons/Laws/SiliconLawSystem.cs index a4a7ee528f..9b3e279b75 100644 --- a/Content.Server/Silicons/Laws/SiliconLawSystem.cs +++ b/Content.Server/Silicons/Laws/SiliconLawSystem.cs @@ -75,14 +75,14 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem { if (!component.Subverted) return; - EnsureSubvertedSiliconRole(uid); + EnsureSubvertedSiliconRole(args.Mind); } private void OnLawProviderMindRemoved(EntityUid uid, SiliconLawProviderComponent component, MindRemovedMessage args) { if (!component.Subverted) return; - RemoveSubvertedSiliconRole(uid); + RemoveSubvertedSiliconRole(args.Mind); } @@ -179,21 +179,14 @@ public sealed class SiliconLawSystem : SharedSiliconLawSystem } - private void EnsureSubvertedSiliconRole(EntityUid uid) + private void EnsureSubvertedSiliconRole(EntityUid mindId) { - if (!_mind.TryGetMind(uid, out var mindId, out _)) - return; - if (!_roles.MindHasRole(mindId)) _roles.MindAddRole(mindId, "MindRoleSubvertedSilicon"); - } - private void RemoveSubvertedSiliconRole(EntityUid uid) + private void RemoveSubvertedSiliconRole(EntityUid mindId) { - if (!_mind.TryGetMind(uid, out var mindId, out _)) - return; - if (_roles.MindHasRole(mindId)) _roles.MindTryRemoveRole(mindId); }