using Content.Shared.Revolutionary.Components; using Content.Shared.IdentityManagement; using Content.Shared.Mindshield.Components; using Content.Shared.Popups; using Content.Shared.Stunnable; namespace Content.Shared.Revolutionary; public sealed class SharedRevolutionarySystem : EntitySystem { [Dependency] private readonly SharedPopupSystem _popupSystem = default!; [Dependency] private readonly SharedStunSystem _sharedStun = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(MindShieldImplanted); } /// /// When the mindshield is implanted in the rev it will popup saying they were deconverted. In Head Revs it will remove the mindshield component. /// private void MindShieldImplanted(EntityUid uid, MindShieldComponent comp, ComponentInit init) { if (HasComp(uid) && !HasComp(uid)) { var stunTime = TimeSpan.FromSeconds(4); var name = Identity.Entity(uid, EntityManager); RemComp(uid); _sharedStun.TryParalyze(uid, stunTime, true); _popupSystem.PopupEntity(Loc.GetString("rev-break-control", ("name", name)), uid); } else if (HasComp(uid)) { RemCompDeferred(uid); } } }