Applying Fix from #32764 to staging

This commit is contained in:
Jezithyr
2024-10-12 22:21:44 -07:00
committed by GitHub
parent e98af125dc
commit af72f2e17c

View 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,7 +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()
{
base.Initialize();
@@ -37,7 +38,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;