Fix skill system real

This commit is contained in:
Aviu00
2024-01-25 17:36:28 +03:00
parent 2f9fb335ab
commit 8011440c38

View File

@@ -3,7 +3,6 @@ using Content.Server.Body.Systems;
using Content.Server.GameTicking.Rules.Components;
using Content.Server.Ghost.Components;
using Content.Server.Kitchen.Components;
using Content.Server.Mind.Components;
using Content.Server.Roles;
using Content.Shared.Body.Components;
using Content.Shared.Interaction;
@@ -13,9 +12,12 @@ using Content.Shared.Storage;
using Content.Shared.Verbs;
using Content.Shared.Destructible;
using Content.Shared.DoAfter;
using Content.Shared.Ghost;
using Content.Shared.Kitchen;
using Content.Shared.Mind.Components;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.NukeOps;
using Robust.Server.Containers;
using Robust.Shared.Random;
using Robust.Shared.Utility;
@@ -31,6 +33,7 @@ public sealed class SharpSystem : EntitySystem
[Dependency] private readonly ContainerSystem _containerSystem = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly RoleSystem _role = default!;
public override void Initialize()
{
@@ -67,7 +70,7 @@ public sealed class SharpSystem : EntitySystem
// WD START
if (butcher.SyndieRoleRequired && !HasComp<NukeOperativeComponent>(user) && !HasComp<GhostComponent>(user) &&
TryComp(user, out MindContainerComponent? mc) && mc.Mind != null &&
!mc.Mind.Roles.OfType<TraitorRole>().Any())
!_role.MindHasRole<TraitorRoleComponent>(mc.Mind.Value))
{
_popupSystem.PopupEntity("Вы не можете разделать столь милое существо.", user, user);
return;