]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fixing Thief Beacon Role Check Logic (to use new mindrole system) (#32764)
authorJohn <35928781+sporkyz@users.noreply.github.com>
Sun, 13 Oct 2024 05:20:03 +0000 (01:20 -0400)
committerGitHub <noreply@github.com>
Sun, 13 Oct 2024 05:20:03 +0000 (22:20 -0700)
Content.Server/Thief/Systems/ThiefBeaconSystem.cs

index 80471b6427946f74484c52305897cd604ec99209..de1c3d2e6d19818874e77a870e291f1e4e1f5e82 100644 (file)
@@ -6,6 +6,7 @@ using Content.Shared.Examine;
 using Content.Shared.Foldable;
 using Content.Shared.Popups;
 using Content.Shared.Verbs;
+using Content.Shared.Roles;
 using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Thief.Systems;
@@ -18,6 +19,7 @@ public sealed class ThiefBeaconSystem : EntitySystem
     [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly SharedPopupSystem _popup = default!;
     [Dependency] private readonly MindSystem _mind = default!;
+    [Dependency] private readonly SharedRoleSystem _roles = default!;
 
     public override void Initialize()
     {
@@ -37,7 +39,7 @@ public sealed class ThiefBeaconSystem : EntitySystem
             return;
 
         var mind = _mind.GetMind(args.User);
-        if (!HasComp<ThiefRoleComponent>(mind))
+        if (mind == null || !_roles.MindHasRole<ThiefRoleComponent>(mind.Value))
             return;
 
         var user = args.User;