using Content.Shared.Standing; using Content.Shared.CCVar; using Content.Shared.Input; using Content.Shared.Movement.Systems; using Content.Shared.Popups; using Robust.Shared.Configuration; using Robust.Shared.Input.Binding; using Robust.Shared.Player; namespace Content.Server.Standing; public sealed class LayingDownSystem : SharedLayingDownSystem { [Dependency] private readonly INetConfigurationManager _cfg = default!; public override void Initialize() { base.Initialize(); SubscribeNetworkEvent(OnCheckAutoGetUp); } private void OnCheckAutoGetUp(CheckAutoGetUpEvent ev, EntitySessionEventArgs args) { var uid = GetEntity(ev.User); if (!TryComp(uid, out LayingDownComponent? layingDown)) return; layingDown.AutoGetUp = _cfg.GetClientCVar(args.SenderSession.Channel, CCVars.AutoGetUp); Dirty(uid, layingDown); } }