using System.Linq; using Content.Server.Actions; using Content.Server.Administration.Systems; using Content.Shared._Starlight.Medical.Limbs; using Content.Shared.Actions; using Content.Shared.Actions.Components; using Content.Shared.Body.Components; using Content.Shared.Interaction.Components; using Content.Shared.Starlight; using Content.Shared.Starlight.Medical.Surgery.Effects.Step; using Content.Shared.Starlight.Medical.Surgery.Events; using Robust.Shared.Prototypes; namespace Content.Server._Starlight.Medical.Limbs; public sealed partial class CyberLimbSystem : EntitySystem { public void InitializeToggleable() { base.Initialize(); SubscribeLocalEvent>(IWithActionAttached); SubscribeLocalEvent>(IWithActionRemoved); } private void IWithActionRemoved(Entity ent, ref LimbRemovedEvent args) => _actions.RemoveProvidedActions(ent.Owner, args.Limb); private void IWithActionAttached(Entity ent, ref LimbAttachedEvent args) => _actions.GrantContainedActions(_slEnt.Entity(ent), _slEnt.Entity(args.Limb)); }