diff --git a/Content.Server/Actions/DisarmAction.cs b/Content.Server/Actions/DisarmAction.cs index cc0be52f42..724b7c20de 100644 --- a/Content.Server/Actions/DisarmAction.cs +++ b/Content.Server/Actions/DisarmAction.cs @@ -40,10 +40,10 @@ namespace Content.Server.Actions if (disarmedActs.Length == 0) { - if (args.Performer.TryGetComponent(out IActorComponent? actor)) + if (args.Performer.TryGetComponent(out ActorComponent? actor)) { // Fall back to a normal interaction with the entity - var player = actor.playerSession; + var player = actor.PlayerSession; var coordinates = args.Target.Transform.Coordinates; var target = args.Target.Uid; EntitySystem.Get().HandleClientUseItemInHand(player, coordinates, target); diff --git a/Content.Server/Administration/Commands/SetOutfitCommand.cs b/Content.Server/Administration/Commands/SetOutfitCommand.cs index e2811abc2d..21b58b95a7 100644 --- a/Content.Server/Administration/Commands/SetOutfitCommand.cs +++ b/Content.Server/Administration/Commands/SetOutfitCommand.cs @@ -86,9 +86,9 @@ namespace Content.Server.Administration.Commands HumanoidCharacterProfile? profile = null; // Check if we are setting the outfit of a player to respect the preferences - if (target.TryGetComponent(out var actorComponent)) + if (target.TryGetComponent(out var actorComponent)) { - var userId = actorComponent.playerSession.UserId; + var userId = actorComponent.PlayerSession.UserId; var preferencesManager = IoCManager.Resolve(); var prefs = preferencesManager.GetPreferences(userId); profile = prefs.SelectedCharacter as HumanoidCharacterProfile; diff --git a/Content.Server/Chat/ChatManager.cs b/Content.Server/Chat/ChatManager.cs index 9febc1ee2d..fb1b7885b2 100644 --- a/Content.Server/Chat/ChatManager.cs +++ b/Content.Server/Chat/ChatManager.cs @@ -126,12 +126,12 @@ namespace Content.Server.Chat } // Check if message exceeds the character limit if the sender is a player - if (source.TryGetComponent(out IActorComponent? actor) && + if (source.TryGetComponent(out ActorComponent? actor) && message.Length > MaxMessageLength) { var feedback = Loc.GetString(MaxLengthExceededMessage, MaxMessageLength); - DispatchServerMessage(actor.playerSession, feedback); + DispatchServerMessage(actor.PlayerSession, feedback); return; } @@ -199,7 +199,7 @@ namespace Content.Server.Chat } // Check if entity is a player - if (!source.TryGetComponent(out IActorComponent? actor)) + if (!source.TryGetComponent(out ActorComponent? actor)) { return; } @@ -207,7 +207,7 @@ namespace Content.Server.Chat // Check if message exceeds the character limit if (action.Length > MaxMessageLength) { - DispatchServerMessage(actor.playerSession, Loc.GetString(MaxLengthExceededMessage, MaxMessageLength)); + DispatchServerMessage(actor.PlayerSession, Loc.GetString(MaxLengthExceededMessage, MaxMessageLength)); return; } diff --git a/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs index 3766dd257d..df04f1db61 100644 --- a/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs @@ -214,12 +214,12 @@ namespace Content.Server.GameObjects.Components.Access void IActivate.Activate(ActivateEventArgs eventArgs) { - if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if(!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) diff --git a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs index 464385f55a..84bc7e2596 100644 --- a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs +++ b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs @@ -50,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Arcade void IActivate.Activate(ActivateEventArgs eventArgs) { - if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if(!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -58,10 +58,10 @@ namespace Content.Server.GameObjects.Components.Arcade { return; } - if(!ActionBlockerSystem.CanInteract(actor.playerSession.AttachedEntity)) return; + if(!ActionBlockerSystem.CanInteract(actor.PlayerSession.AttachedEntity)) return; - UserInterface?.Toggle(actor.playerSession); - RegisterPlayerSession(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); + RegisterPlayerSession(actor.PlayerSession); } private void RegisterPlayerSession(IPlayerSession session) diff --git a/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs b/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs index 1752e68e7d..5bc4b94214 100644 --- a/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs +++ b/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs @@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.Components.Arcade void IActivate.Activate(ActivateEventArgs eventArgs) { - if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if(!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -67,16 +67,16 @@ namespace Content.Server.GameObjects.Components.Arcade { return; } - if(!ActionBlockerSystem.CanInteract(actor.playerSession.AttachedEntity)) return; + if(!ActionBlockerSystem.CanInteract(actor.PlayerSession.AttachedEntity)) return; _game ??= new SpaceVillainGame(this); if (_wiresComponent?.IsPanelOpen == true) { - _wiresComponent.OpenInterface(actor.playerSession); + _wiresComponent.OpenInterface(actor.PlayerSession); } else { - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); } } diff --git a/Content.Server/GameObjects/Components/Atmos/GasAnalyzerComponent.cs b/Content.Server/GameObjects/Components/Atmos/GasAnalyzerComponent.cs index 9bec209c6c..54fcb56606 100644 --- a/Content.Server/GameObjects/Components/Atmos/GasAnalyzerComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GasAnalyzerComponent.cs @@ -257,9 +257,9 @@ namespace Content.Server.GameObjects.Components.Atmos return true; } - if (eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (eventArgs.User.TryGetComponent(out ActorComponent? actor)) { - OpenInterface(actor.playerSession, eventArgs.ClickLocation); + OpenInterface(actor.PlayerSession, eventArgs.ClickLocation); } return true; @@ -269,17 +269,17 @@ namespace Content.Server.GameObjects.Components.Atmos void IDropped.Dropped(DroppedEventArgs eventArgs) { - if (eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (eventArgs.User.TryGetComponent(out ActorComponent? actor)) { - CloseInterface(actor.playerSession); + CloseInterface(actor.PlayerSession); } } bool IUse.UseEntity(UseEntityEventArgs eventArgs) { - if (eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (eventArgs.User.TryGetComponent(out ActorComponent? actor)) { - ToggleInterface(actor.playerSession); + ToggleInterface(actor.PlayerSession); return true; } return false; diff --git a/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs b/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs index 8019c0b313..c937e9ca41 100644 --- a/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GasCanisterComponent.cs @@ -156,10 +156,10 @@ namespace Content.Server.GameObjects.Components.Atmos void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } private void OnUiReceiveMessage(ServerBoundUserInterfaceMessage obj) diff --git a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs index 67f50048d0..daae1f09d9 100644 --- a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs @@ -159,15 +159,15 @@ namespace Content.Server.GameObjects.Components.Atmos bool IUse.UseEntity(UseEntityEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false; - OpenInterface(actor.playerSession); + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return false; + OpenInterface(actor.PlayerSession); return true; } void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return; - OpenInterface(actor.playerSession); + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; + OpenInterface(actor.PlayerSession); } public void ConnectToInternals() @@ -330,7 +330,7 @@ namespace Content.Server.GameObjects.Components.Atmos protected override void GetData(IEntity user, GasTankComponent component, VerbData data) { data.Visibility = VerbVisibility.Invisible; - if (!user.HasComponent()) + if (!user.HasComponent()) { return; } @@ -341,12 +341,12 @@ namespace Content.Server.GameObjects.Components.Atmos protected override void Activate(IEntity user, GasTankComponent component) { - if (!user.TryGetComponent(out var actor)) + if (!user.TryGetComponent(out var actor)) { return; } - component.OpenInterface(actor.playerSession); + component.OpenInterface(actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/Body/BodyScannerComponent.cs b/Content.Server/GameObjects/Components/Body/BodyScannerComponent.cs index 332d42dab3..0660314c1e 100644 --- a/Content.Server/GameObjects/Components/Body/BodyScannerComponent.cs +++ b/Content.Server/GameObjects/Components/Body/BodyScannerComponent.cs @@ -18,12 +18,12 @@ namespace Content.Server.GameObjects.Components.Body void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } - var session = actor.playerSession; + var session = actor.PlayerSession; if (session.AttachedEntity == null) { diff --git a/Content.Server/GameObjects/Components/Body/MechanismComponent.cs b/Content.Server/GameObjects/Components/Body/MechanismComponent.cs index 36e47a42ed..932b8cd164 100644 --- a/Content.Server/GameObjects/Components/Body/MechanismComponent.cs +++ b/Content.Server/GameObjects/Components/Body/MechanismComponent.cs @@ -79,10 +79,10 @@ namespace Content.Server.GameObjects.Components.Body } if (OptionsCache.Count > 0 && - eventArgs.User.TryGetComponent(out IActorComponent? actor)) + eventArgs.User.TryGetComponent(out ActorComponent? actor)) { - OpenSurgeryUI(actor.playerSession); - UpdateSurgeryUIBodyPartRequest(actor.playerSession, toSend); + OpenSurgeryUI(actor.PlayerSession); + UpdateSurgeryUIBodyPartRequest(actor.PlayerSession, toSend); PerformerCache = eventArgs.User; BodyCache = body; } @@ -99,12 +99,12 @@ namespace Content.Server.GameObjects.Components.Body private void HandleReceiveBodyPart(int key) { if (PerformerCache == null || - !PerformerCache.TryGetComponent(out IActorComponent? actor)) + !PerformerCache.TryGetComponent(out ActorComponent? actor)) { return; } - CloseSurgeryUI(actor.playerSession); + CloseSurgeryUI(actor.PlayerSession); if (BodyCache == null) { diff --git a/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs b/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs index c09096dc7c..fbd6e08899 100644 --- a/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs @@ -144,8 +144,8 @@ namespace Content.Server.GameObjects.Components.Body.Part if (_optionsCache.Count > 0) { - OpenSurgeryUI(eventArgs.User.GetComponent().playerSession); - BodyPartSlotRequest(eventArgs.User.GetComponent().playerSession, + OpenSurgeryUI(eventArgs.User.GetComponent().PlayerSession); + BodyPartSlotRequest(eventArgs.User.GetComponent().PlayerSession, toSend); _surgeonCache = eventArgs.User; _owningBodyCache = body; @@ -164,12 +164,12 @@ namespace Content.Server.GameObjects.Components.Body.Part private void ReceiveBodyPartSlot(int key) { if (_surgeonCache == null || - !_surgeonCache.TryGetComponent(out IActorComponent? actor)) + !_surgeonCache.TryGetComponent(out ActorComponent? actor)) { return; } - CloseSurgeryUI(actor.playerSession); + CloseSurgeryUI(actor.PlayerSession); if (_owningBodyCache == null) { @@ -233,14 +233,14 @@ namespace Content.Server.GameObjects.Components.Body.Part return; } - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "attachbodypart")) + if (!groupController.CanCommand(actor.PlayerSession, "attachbodypart")) { return; } diff --git a/Content.Server/GameObjects/Components/Body/Surgery/SurgeryToolComponent.cs b/Content.Server/GameObjects/Components/Body/Surgery/SurgeryToolComponent.cs index a70d424e22..19d866632b 100644 --- a/Content.Server/GameObjects/Components/Body/Surgery/SurgeryToolComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Surgery/SurgeryToolComponent.cs @@ -56,7 +56,7 @@ namespace Content.Server.GameObjects.Components.Body.Surgery return false; } - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return false; } @@ -81,8 +81,8 @@ namespace Content.Server.GameObjects.Components.Body.Surgery if (_optionsCache.Count > 0) { - OpenSurgeryUI(actor.playerSession); - UpdateSurgeryUIBodyPartRequest(actor.playerSession, toSend); + OpenSurgeryUI(actor.PlayerSession); + UpdateSurgeryUIBodyPartRequest(actor.PlayerSession, toSend); PerformerCache = eventArgs.User; // Also, cache the data. BodyCache = body; } @@ -131,8 +131,8 @@ namespace Content.Server.GameObjects.Components.Body.Surgery if (_optionsCache.Count > 0 && PerformerCache != null) { - OpenSurgeryUI(PerformerCache.GetComponent().playerSession); - UpdateSurgeryUIMechanismRequest(PerformerCache.GetComponent().playerSession, + OpenSurgeryUI(PerformerCache.GetComponent().PlayerSession); + UpdateSurgeryUIMechanismRequest(PerformerCache.GetComponent().PlayerSession, toSend); _callbackCache = callback; } @@ -214,12 +214,12 @@ namespace Content.Server.GameObjects.Components.Body.Surgery private void HandleReceiveBodyPart(int key) { if (PerformerCache == null || - !PerformerCache.TryGetComponent(out IActorComponent? actor)) + !PerformerCache.TryGetComponent(out ActorComponent? actor)) { return; } - CloseSurgeryUI(actor.playerSession); + CloseSurgeryUI(actor.PlayerSession); // TODO: sanity checks to see whether user is in range, user is still able-bodied, target is still the same, etc etc if (!_optionsCache.TryGetValue(key, out var targetObject) || BodyCache == null) @@ -248,13 +248,13 @@ namespace Content.Server.GameObjects.Components.Body.Surgery !_optionsCache.TryGetValue(key, out var targetObject) || targetObject is not MechanismComponent target || PerformerCache == null || - !PerformerCache.TryGetComponent(out IActorComponent? actor)) + !PerformerCache.TryGetComponent(out ActorComponent? actor)) { NotUsefulAnymorePopup(); return; } - CloseSurgeryUI(actor.playerSession); + CloseSurgeryUI(actor.PlayerSession); _callbackCache?.Invoke(target, BodyCache, this, PerformerCache); } diff --git a/Content.Server/GameObjects/Components/Cargo/CargoConsoleComponent.cs b/Content.Server/GameObjects/Components/Cargo/CargoConsoleComponent.cs index a6d8ecffbd..9f8999f492 100644 --- a/Content.Server/GameObjects/Components/Cargo/CargoConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Cargo/CargoConsoleComponent.cs @@ -191,14 +191,14 @@ namespace Content.Server.GameObjects.Components.Cargo void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } if (!Powered) return; - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } private void UpdateUIState() diff --git a/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs index a4094cb684..1653c3edde 100644 --- a/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs @@ -348,7 +348,7 @@ namespace Content.Server.GameObjects.Components.Chemistry /// Data relevant to the event such as the actor which triggered it. void IActivate.Activate(ActivateEventArgs args) { - if (!args.User.TryGetComponent(out IActorComponent? actor)) + if (!args.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -362,7 +362,7 @@ namespace Content.Server.GameObjects.Components.Chemistry var activeHandEntity = hands.GetActiveHand?.Owner; if (activeHandEntity == null) { - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } } diff --git a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs index 4a45870e45..f0cc4322ab 100644 --- a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs @@ -288,7 +288,7 @@ namespace Content.Server.GameObjects.Components.Chemistry /// Data relevant to the event such as the actor which triggered it. void IActivate.Activate(ActivateEventArgs args) { - if (!args.User.TryGetComponent(out IActorComponent? actor)) + if (!args.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -302,7 +302,7 @@ namespace Content.Server.GameObjects.Components.Chemistry var activeHandEntity = hands.GetActiveHand?.Owner; if (activeHandEntity == null) { - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } } diff --git a/Content.Server/GameObjects/Components/Chemistry/SolutionTransferVerbs.cs b/Content.Server/GameObjects/Components/Chemistry/SolutionTransferVerbs.cs index fadbf82ee6..9fc25fabdb 100644 --- a/Content.Server/GameObjects/Components/Chemistry/SolutionTransferVerbs.cs +++ b/Content.Server/GameObjects/Components/Chemistry/SolutionTransferVerbs.cs @@ -176,9 +176,9 @@ namespace Content.Server.GameObjects.Components.Chemistry var adminManager = IoCManager.Resolve(); - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { - if (adminManager.HasAdminFlag(player.playerSession, ReqFlags)) + if (adminManager.HasAdminFlag(player.PlayerSession, ReqFlags)) { data.Visibility = VerbVisibility.Visible; } @@ -188,10 +188,10 @@ namespace Content.Server.GameObjects.Components.Chemistry public override void Activate(IEntity user, IEntity target) { var groupController = IoCManager.Resolve(); - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { - if (groupController.HasAdminFlag(player.playerSession, ReqFlags)) - OpenAddReagentMenu(player.playerSession, target); + if (groupController.HasAdminFlag(player.PlayerSession, ReqFlags)) + OpenAddReagentMenu(player.PlayerSession, target); } } diff --git a/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs index d2adf34dfd..ee28d33a5f 100644 --- a/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Command/CommunicationsConsoleComponent.cs @@ -128,7 +128,7 @@ namespace Content.Server.GameObjects.Components.Command void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; /* if (!Powered) @@ -136,7 +136,7 @@ namespace Content.Server.GameObjects.Components.Command return; } */ - OpenUserInterface(actor.playerSession); + OpenUserInterface(actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/ConfigurationComponent.cs b/Content.Server/GameObjects/Components/ConfigurationComponent.cs index df3e81b9a6..f693ad1d66 100644 --- a/Content.Server/GameObjects/Components/ConfigurationComponent.cs +++ b/Content.Server/GameObjects/Components/ConfigurationComponent.cs @@ -78,7 +78,7 @@ namespace Content.Server.GameObjects.Components async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { - if (UserInterface == null || !eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (UserInterface == null || !eventArgs.User.TryGetComponent(out ActorComponent? actor)) return false; if (!eventArgs.Using.TryGetComponent(out var tool)) @@ -117,11 +117,11 @@ namespace Content.Server.GameObjects.Components UserInterface?.SetState(new ConfigurationBoundUserInterfaceState(_config)); } - private void OpenUserInterface(IActorComponent actor) + private void OpenUserInterface(ActorComponent actor) { UpdateUserInterface(); - UserInterface?.Open(actor.playerSession); - UserInterface?.SendMessage(new ValidationUpdateMessage(_validation.ToString()), actor.playerSession); + UserInterface?.Open(actor.PlayerSession); + UserInterface?.SendMessage(new ValidationUpdateMessage(_validation.ToString()), actor.PlayerSession); } private static void FillConfiguration(List list, Dictionary configuration, T value){ @@ -150,7 +150,7 @@ namespace Content.Server.GameObjects.Components protected override void Activate(IEntity user, ConfigurationComponent component) { - if (user.TryGetComponent(out IActorComponent? actor)) + if (user.TryGetComponent(out ActorComponent? actor)) { component.OpenUserInterface(actor); } diff --git a/Content.Server/GameObjects/Components/CrayonComponent.cs b/Content.Server/GameObjects/Components/CrayonComponent.cs index fea47acd26..2c74584bd8 100644 --- a/Content.Server/GameObjects/Components/CrayonComponent.cs +++ b/Content.Server/GameObjects/Components/CrayonComponent.cs @@ -95,10 +95,10 @@ namespace Content.Server.GameObjects.Components // Opens the selection window bool IUse.UseEntity(UseEntityEventArgs eventArgs) { - if (eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (eventArgs.User.TryGetComponent(out ActorComponent? actor)) { - UserInterface?.Toggle(actor.playerSession); - if (UserInterface?.SessionHasOpen(actor.playerSession) == true) + UserInterface?.Toggle(actor.PlayerSession); + if (UserInterface?.SessionHasOpen(actor.PlayerSession) == true) { // Tell the user interface the selected stuff UserInterface.SetState( @@ -146,8 +146,8 @@ namespace Content.Server.GameObjects.Components void IDropped.Dropped(DroppedEventArgs eventArgs) { - if (eventArgs.User.TryGetComponent(out IActorComponent? actor)) - UserInterface?.Close(actor.playerSession); + if (eventArgs.User.TryGetComponent(out ActorComponent? actor)) + UserInterface?.Close(actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs index 0b31b4f8bd..86a5412a07 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs @@ -186,9 +186,9 @@ namespace Content.Server.GameObjects.Components.Disposal { TryQueueEngage(); - if (entity.TryGetComponent(out IActorComponent? actor)) + if (entity.TryGetComponent(out ActorComponent? actor)) { - UserInterface?.Close(actor.playerSession); + UserInterface?.Close(actor.PlayerSession); } UpdateVisualState(); @@ -688,7 +688,7 @@ namespace Content.Server.GameObjects.Components.Disposal return false; } - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return false; } @@ -699,7 +699,7 @@ namespace Content.Server.GameObjects.Components.Disposal { UpdateTargetList(); UpdateInterface(); - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); return true; } @@ -708,14 +708,14 @@ namespace Content.Server.GameObjects.Components.Disposal void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } if (IsValidInteraction(eventArgs)) { - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } return; diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs index 0fe8bb5ec4..7c1a7c0571 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalRouterComponent.cs @@ -156,7 +156,7 @@ namespace Content.Server.GameObjects.Components.Disposal /// Data relevant to the event such as the actor which triggered it. void IActivate.Activate(ActivateEventArgs args) { - if (!args.User.TryGetComponent(out IActorComponent? actor)) + if (!args.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -180,10 +180,10 @@ namespace Content.Server.GameObjects.Components.Disposal base.OnRemove(); } - private void OpenUserInterface(IActorComponent actor) + private void OpenUserInterface(ActorComponent actor) { UpdateUserInterface(); - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } [Verb] @@ -205,7 +205,7 @@ namespace Content.Server.GameObjects.Components.Disposal protected override void Activate(IEntity user, DisposalRouterComponent component) { - if (user.TryGetComponent(out IActorComponent? actor)) + if (user.TryGetComponent(out ActorComponent? actor)) { component.OpenUserInterface(actor); } diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs index ee17f79d5f..3560b1557f 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalTaggerComponent.cs @@ -122,7 +122,7 @@ namespace Content.Server.GameObjects.Components.Disposal /// Data relevant to the event such as the actor which triggered it. void IActivate.Activate(ActivateEventArgs args) { - if (!args.User.TryGetComponent(out IActorComponent? actor)) + if (!args.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -153,7 +153,7 @@ namespace Content.Server.GameObjects.Components.Disposal { var groupController = IoCManager.Resolve(); - if (!user.TryGetComponent(out IActorComponent? actor) || !groupController.CanAdminMenu(actor.playerSession)) + if (!user.TryGetComponent(out ActorComponent? actor) || !groupController.CanAdminMenu(actor.PlayerSession)) { data.Visibility = VerbVisibility.Invisible; return; @@ -165,17 +165,17 @@ namespace Content.Server.GameObjects.Components.Disposal protected override void Activate(IEntity user, DisposalTaggerComponent component) { - if (user.TryGetComponent(out IActorComponent? actor)) + if (user.TryGetComponent(out ActorComponent? actor)) { component.OpenUserInterface(actor); } } } - private void OpenUserInterface(IActorComponent actor) + private void OpenUserInterface(ActorComponent actor) { UpdateUserInterface(); - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalTubeComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalTubeComponent.cs index 22806c2daf..e351b3ee08 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalTubeComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalTubeComponent.cs @@ -292,9 +292,9 @@ namespace Content.Server.GameObjects.Components.Disposal var groupController = IoCManager.Resolve(); - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { - if (groupController.CanCommand(player.playerSession, "tubeconnections")) + if (groupController.CanCommand(player.PlayerSession, "tubeconnections")) { data.Visibility = VerbVisibility.Visible; } @@ -305,9 +305,9 @@ namespace Content.Server.GameObjects.Components.Disposal { var groupController = IoCManager.Resolve(); - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { - if (groupController.CanCommand(player.playerSession, "tubeconnections")) + if (groupController.CanCommand(player.PlayerSession, "tubeconnections")) { component.PopupDirections(user); } diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs index cb043e2702..0a906d5bef 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs @@ -166,9 +166,9 @@ namespace Content.Server.GameObjects.Components.Disposal { TryQueueEngage(); - if (entity.TryGetComponent(out IActorComponent? actor)) + if (entity.TryGetComponent(out ActorComponent? actor)) { - UserInterface?.Close(actor.playerSession); + UserInterface?.Close(actor.PlayerSession); } UpdateVisualState(); @@ -584,7 +584,7 @@ namespace Content.Server.GameObjects.Components.Disposal bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return false; } @@ -592,7 +592,7 @@ namespace Content.Server.GameObjects.Components.Disposal if (IsValidInteraction(eventArgs)) { - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); return true; } @@ -601,14 +601,14 @@ namespace Content.Server.GameObjects.Components.Disposal void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } if (IsValidInteraction(eventArgs)) { - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } return; diff --git a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs index b97e39022c..9d749161bf 100644 --- a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs @@ -156,9 +156,9 @@ namespace Content.Server.GameObjects.Components.Doors bool IDoorCheck.BlockActivate(ActivateEventArgs eventArgs) { if (_wiresComponent != null && _wiresComponent.IsPanelOpen && - eventArgs.User.TryGetComponent(out IActorComponent? actor)) + eventArgs.User.TryGetComponent(out ActorComponent? actor)) { - _wiresComponent.OpenInterface(actor.playerSession); + _wiresComponent.OpenInterface(actor.PlayerSession); return true; } return false; diff --git a/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs b/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs index 07ba947103..101e678b9a 100644 --- a/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/InventoryComponent.cs @@ -705,8 +705,8 @@ namespace Content.Server.GameObjects.Components.GUI private static bool CanCommand(IEntity user) { var groupController = IoCManager.Resolve(); - return user.TryGetComponent(out var player) && - groupController.CanCommand(player.playerSession, "setoutfit"); + return user.TryGetComponent(out var player) && + groupController.CanCommand(player.PlayerSession, "setoutfit"); } } } diff --git a/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs b/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs index a7ce8ccf35..166a988004 100644 --- a/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/StrippableComponent.cs @@ -76,9 +76,9 @@ namespace Content.Server.GameObjects.Components.GUI public override bool Drop(DragDropEventArgs args) { - if (!args.User.TryGetComponent(out IActorComponent? actor)) return false; + if (!args.User.TryGetComponent(out ActorComponent? actor)) return false; - OpenUserInterface(actor.playerSession); + OpenUserInterface(actor.PlayerSession); return true; } @@ -445,12 +445,12 @@ namespace Content.Server.GameObjects.Components.GUI protected override void Activate(IEntity user, StrippableComponent component) { - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } - component.OpenUserInterface(actor.playerSession); + component.OpenUserInterface(actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs b/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs index 2c51a5b0ca..16fa567b4c 100644 --- a/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs +++ b/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs @@ -77,13 +77,13 @@ namespace Content.Server.GameObjects.Components.Gravity bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out var actor)) + if (!eventArgs.User.TryGetComponent(out var actor)) return false; if (Status != GravityGeneratorStatus.Off && Status != GravityGeneratorStatus.On) { return false; } - OpenUserInterface(actor.playerSession); + OpenUserInterface(actor.PlayerSession); return true; } diff --git a/Content.Server/GameObjects/Components/Headset/HeadsetComponent.cs b/Content.Server/GameObjects/Components/Headset/HeadsetComponent.cs index 1c1c65cdc8..435bcc0b93 100644 --- a/Content.Server/GameObjects/Components/Headset/HeadsetComponent.cs +++ b/Content.Server/GameObjects/Components/Headset/HeadsetComponent.cs @@ -57,10 +57,10 @@ namespace Content.Server.GameObjects.Components.Headset { if (Owner.TryGetContainer(out var container)) { - if (!container.Owner.TryGetComponent(out IActorComponent? actor)) + if (!container.Owner.TryGetComponent(out ActorComponent? actor)) return; - var playerChannel = actor.playerSession.ConnectedClient; + var playerChannel = actor.PlayerSession.ConnectedClient; var msg = _netManager.CreateNetMessage(); diff --git a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs index 13a3f9245e..5cfedb0427 100644 --- a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs +++ b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs @@ -270,10 +270,10 @@ namespace Content.Server.GameObjects.Components.Instruments void IHandSelected.HandSelected(HandSelectedEventArgs eventArgs) { - if (eventArgs.User == null || !eventArgs.User.TryGetComponent(out BasicActorComponent? actor)) + if (eventArgs.User == null || !eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; - var session = actor.playerSession; + var session = actor.PlayerSession; if (session.Status != SessionStatus.InGame) return; @@ -289,21 +289,21 @@ namespace Content.Server.GameObjects.Components.Instruments void IActivate.Activate(ActivateEventArgs eventArgs) { - if (Handheld || !eventArgs.User.TryGetComponent(out IActorComponent? actor)) return; + if (Handheld || !eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; if (InstrumentPlayer != null) return; - InstrumentPlayer = actor.playerSession; - OpenUserInterface(actor.playerSession); + InstrumentPlayer = actor.PlayerSession; + OpenUserInterface(actor.PlayerSession); } bool IUse.UseEntity(UseEntityEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false; + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return false; - if (InstrumentPlayer == actor.playerSession) + if (InstrumentPlayer == actor.PlayerSession) { - OpenUserInterface(actor.playerSession); + OpenUserInterface(actor.PlayerSession); } return false; diff --git a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs index 55a2aaa311..badc5a7385 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs @@ -246,7 +246,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage PlaySoundCollection(StorageSoundCollection); EnsureInitialCalculated(); - var userSession = entity.GetComponent().playerSession; + var userSession = entity.GetComponent().PlayerSession; Logger.DebugS(LoggerName, $"Storage (UID {Owner.Uid}) \"used\" by player session (UID {userSession.AttachedEntityUid})."); diff --git a/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs b/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs index 0d902d378b..adf45e57fd 100644 --- a/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs +++ b/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs @@ -181,13 +181,13 @@ namespace Content.Server.GameObjects.Components.Kitchen void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor) || !Powered) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor) || !Powered) { return; } _uiDirty = true; - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); } async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) diff --git a/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs b/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs index 6677f3eb74..b5294245d6 100644 --- a/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs +++ b/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs @@ -256,12 +256,12 @@ namespace Content.Server.GameObjects.Components.Kitchen void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } _uiDirty = true; - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); } async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) diff --git a/Content.Server/GameObjects/Components/MagicMirrorComponent.cs b/Content.Server/GameObjects/Components/MagicMirrorComponent.cs index a4ee2566d4..7588c8adb3 100644 --- a/Content.Server/GameObjects/Components/MagicMirrorComponent.cs +++ b/Content.Server/GameObjects/Components/MagicMirrorComponent.cs @@ -95,7 +95,7 @@ namespace Content.Server.GameObjects.Components void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -106,7 +106,7 @@ namespace Content.Server.GameObjects.Components return; } - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); var appearance = looks.Appearance; @@ -121,7 +121,7 @@ namespace Content.Server.GameObjects.Components looks.CanColorHair, looks.CanColorFacialHair); - UserInterface?.SendMessage(msg, actor.playerSession); + UserInterface?.SendMessage(msg, actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs index 53c67c3eeb..23586993c9 100644 --- a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs +++ b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs @@ -184,7 +184,7 @@ namespace Content.Server.GameObjects.Components.Medical void IActivate.Activate(ActivateEventArgs args) { - if (!args.User.TryGetComponent(out IActorComponent? actor)) + if (!args.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -192,7 +192,7 @@ namespace Content.Server.GameObjects.Components.Medical if (!Powered) return; - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } [Verb] diff --git a/Content.Server/GameObjects/Components/Morgue/MorgueEntityStorageComponent.cs b/Content.Server/GameObjects/Components/Morgue/MorgueEntityStorageComponent.cs index 1cab3005e9..528a7123df 100644 --- a/Content.Server/GameObjects/Components/Morgue/MorgueEntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Morgue/MorgueEntityStorageComponent.cs @@ -116,7 +116,7 @@ namespace Content.Server.GameObjects.Components.Morgue { count++; if (!hasMob && entity.HasComponent()) hasMob = true; - if (!hasSoul && entity.TryGetComponent(out var actor) && actor.playerSession != null) hasSoul = true; + if (!hasSoul && entity.TryGetComponent(out var actor) && actor.PlayerSession != null) hasSoul = true; } Appearance?.SetData(MorgueVisuals.HasContents, count > 0); Appearance?.SetData(MorgueVisuals.HasMob, hasMob); diff --git a/Content.Server/GameObjects/Components/Observer/GhostComponent.cs b/Content.Server/GameObjects/Components/Observer/GhostComponent.cs index b05b017676..29677d3fc8 100644 --- a/Content.Server/GameObjects/Components/Observer/GhostComponent.cs +++ b/Content.Server/GameObjects/Components/Observer/GhostComponent.cs @@ -82,15 +82,15 @@ namespace Content.Server.GameObjects.Components.Observer { case ReturnToBodyComponentMessage: { - if (!Owner.TryGetComponent(out IActorComponent? actor) || + if (!Owner.TryGetComponent(out ActorComponent? actor) || !CanReturnToBody) { break; } - if (netChannel == actor.playerSession.ConnectedClient) + if (netChannel == actor.PlayerSession.ConnectedClient) { - var o = actor.playerSession.ContentData()!.Mind; + var o = actor.PlayerSession.ContentData()!.Mind; o?.UnVisit(); } break; @@ -122,7 +122,7 @@ namespace Content.Server.GameObjects.Components.Observer break; } - if (!Owner.TryGetComponent(out IActorComponent? actor)) + if (!Owner.TryGetComponent(out ActorComponent? actor)) { break; } @@ -133,7 +133,7 @@ namespace Content.Server.GameObjects.Components.Observer break; } - if (!_playerManager.TryGetSessionByChannel(actor.playerSession.ConnectedClient, out var player) || + if (!_playerManager.TryGetSessionByChannel(actor.PlayerSession.ConnectedClient, out var player) || player.AttachedEntity != entity) { break; diff --git a/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs b/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs index d0195877a8..03fcf8100a 100644 --- a/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs +++ b/Content.Server/GameObjects/Components/PA/ParticleAcceleratorControlBoxComponent.cs @@ -220,14 +220,14 @@ namespace Content.Server.GameObjects.Components.PA void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } if (Owner.TryGetComponent(out var wires) && wires.IsPanelOpen) { - wires.OpenInterface(actor.playerSession); + wires.OpenInterface(actor.PlayerSession); } else { @@ -236,7 +236,7 @@ namespace Content.Server.GameObjects.Components.PA return; } - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); UpdateUI(); } } diff --git a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs index 09e5fdc1ce..ee57d3d9bc 100644 --- a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs +++ b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs @@ -271,23 +271,23 @@ namespace Content.Server.GameObjects.Components.PDA void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); UpdatePDAAppearance(); } bool IUse.UseEntity(UseEntityEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return false; } - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); UpdatePDAAppearance(); return true; } diff --git a/Content.Server/GameObjects/Components/Paper/PaperComponent.cs b/Content.Server/GameObjects/Components/Paper/PaperComponent.cs index edb8b2b724..9727b19bdc 100644 --- a/Content.Server/GameObjects/Components/Paper/PaperComponent.cs +++ b/Content.Server/GameObjects/Components/Paper/PaperComponent.cs @@ -47,12 +47,12 @@ namespace Content.Server.GameObjects.Components.Paper bool IUse.UseEntity(UseEntityEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return false; _mode = PaperAction.Read; UpdateUserInterface(); - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); return true; } @@ -77,12 +77,12 @@ namespace Content.Server.GameObjects.Components.Paper { if (!eventArgs.Using.HasTag("Write")) return false; - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return false; _mode = PaperAction.Write; UpdateUserInterface(); - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); return true; } } diff --git a/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs b/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs index 616eae5626..e6f5865a79 100644 --- a/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs +++ b/Content.Server/GameObjects/Components/Power/AME/AMEControllerComponent.cs @@ -114,7 +114,7 @@ namespace Content.Server.GameObjects.Components.Power.AME /// Data relevant to the event such as the actor which triggered it. void IActivate.Activate(ActivateEventArgs args) { - if (!args.User.TryGetComponent(out IActorComponent? actor)) + if (!args.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -128,7 +128,7 @@ namespace Content.Server.GameObjects.Components.Power.AME var activeHandEntity = hands.GetActiveHand?.Owner; if (activeHandEntity == null) { - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } } diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/ApcComponent.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/ApcComponent.cs index 79f04f8991..538ec858af 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/ApcComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/ApcComponent.cs @@ -195,12 +195,12 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/Power/PowerNetComponents/SolarControlConsoleComponent.cs b/Content.Server/GameObjects/Components/Power/PowerNetComponents/SolarControlConsoleComponent.cs index ca64b51557..4c4452e4ad 100644 --- a/Content.Server/GameObjects/Components/Power/PowerNetComponents/SolarControlConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerNetComponents/SolarControlConsoleComponent.cs @@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.Components.Power.PowerNetComponents void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -71,7 +71,7 @@ namespace Content.Server.GameObjects.Components.Power.PowerNetComponents // always update the UI immediately before opening, just in case UpdateUIState(); - UserInterface?.Open(actor.playerSession); + UserInterface?.Open(actor.PlayerSession); } } } diff --git a/Content.Server/GameObjects/Components/Research/LatheComponent.cs b/Content.Server/GameObjects/Components/Research/LatheComponent.cs index fb68fc1920..f07d2f19e2 100644 --- a/Content.Server/GameObjects/Components/Research/LatheComponent.cs +++ b/Content.Server/GameObjects/Components/Research/LatheComponent.cs @@ -138,14 +138,14 @@ namespace Content.Server.GameObjects.Components.Research void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; if (!Powered) { return; } - OpenUserInterface(actor.playerSession); + OpenUserInterface(actor.PlayerSession); } async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) diff --git a/Content.Server/GameObjects/Components/Research/ResearchClientComponent.cs b/Content.Server/GameObjects/Components/Research/ResearchClientComponent.cs index 25b485e692..7faaa900ce 100644 --- a/Content.Server/GameObjects/Components/Research/ResearchClientComponent.cs +++ b/Content.Server/GameObjects/Components/Research/ResearchClientComponent.cs @@ -59,10 +59,10 @@ namespace Content.Server.GameObjects.Components.Research void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; - OpenUserInterface(actor.playerSession); + OpenUserInterface(actor.PlayerSession); } public void UpdateUserInterface() diff --git a/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs b/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs index 11ad16241c..df168e2cd5 100644 --- a/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs @@ -110,14 +110,14 @@ namespace Content.Server.GameObjects.Components.Research void IActivate.Activate(ActivateEventArgs eventArgs) { - if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (!eventArgs.User.TryGetComponent(out ActorComponent? actor)) return; if (!Powered) { return; } - OpenUserInterface(actor.playerSession); + OpenUserInterface(actor.PlayerSession); PlayKeyboardSound(); } diff --git a/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs b/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs index 39e2e58311..ba26aecb12 100644 --- a/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs +++ b/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs @@ -52,7 +52,7 @@ namespace Content.Server.GameObjects.Components.VendingMachines void IActivate.Activate(ActivateEventArgs eventArgs) { - if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if(!eventArgs.User.TryGetComponent(out ActorComponent? actor)) { return; } @@ -62,10 +62,10 @@ namespace Content.Server.GameObjects.Components.VendingMachines var wires = Owner.GetComponent(); if (wires.IsPanelOpen) { - wires.OpenInterface(actor.playerSession); + wires.OpenInterface(actor.PlayerSession); } else { - UserInterface?.Toggle(actor.playerSession); + UserInterface?.Toggle(actor.PlayerSession); } } diff --git a/Content.Server/GameObjects/Components/WiresComponent.cs b/Content.Server/GameObjects/Components/WiresComponent.cs index a6ca152089..4e94718a5f 100644 --- a/Content.Server/GameObjects/Components/WiresComponent.cs +++ b/Content.Server/GameObjects/Components/WiresComponent.cs @@ -489,9 +489,9 @@ namespace Content.Server.GameObjects.Components (tool.HasQuality(ToolQuality.Cutting) || tool.HasQuality(ToolQuality.Multitool))) { - if (eventArgs.User.TryGetComponent(out IActorComponent? actor)) + if (eventArgs.User.TryGetComponent(out ActorComponent? actor)) { - OpenInterface(actor.playerSession); + OpenInterface(actor.PlayerSession); return true; } } diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index 2cd8a13cd5..9694a29205 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -192,7 +192,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click /// internal void UseItemInHand(IEntity entity, EntityCoordinates coords, EntityUid uid) { - if (entity.HasComponent()) + if (entity.HasComponent()) { throw new InvalidOperationException(); } diff --git a/Content.Server/GameObjects/EntitySystems/CloningSystem.cs b/Content.Server/GameObjects/EntitySystems/CloningSystem.cs index 6ed68a0ad9..37819be691 100644 --- a/Content.Server/GameObjects/EntitySystems/CloningSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/CloningSystem.cs @@ -49,12 +49,12 @@ namespace Content.Server.GameObjects.EntitySystems private void HandleActivate(EntityUid uid, CloningPodComponent component, ActivateInWorldMessage args) { if (!component.Powered || - !args.User.TryGetComponent(out IActorComponent? actor)) + !args.User.TryGetComponent(out ActorComponent? actor)) { return; } - component.UserInterface?.Open(actor.playerSession); + component.UserInterface?.Open(actor.PlayerSession); } private void HandleMindAdded(EntityUid uid, BeingClonedComponent component, MindAddedMessage message) diff --git a/Content.Server/GlobalVerbs/AttachToGrandparentVerb.cs b/Content.Server/GlobalVerbs/AttachToGrandparentVerb.cs index ba0a70acce..c0f72b8ea4 100644 --- a/Content.Server/GlobalVerbs/AttachToGrandparentVerb.cs +++ b/Content.Server/GlobalVerbs/AttachToGrandparentVerb.cs @@ -20,13 +20,13 @@ namespace Content.Server.GlobalVerbs return; } - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "attachtograndparent")) + if (!groupController.CanCommand(actor.PlayerSession, "attachtograndparent")) { return; } @@ -38,13 +38,13 @@ namespace Content.Server.GlobalVerbs public override void Activate(IEntity user, IEntity target) { - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "attachtograndparent")) + if (!groupController.CanCommand(actor.PlayerSession, "attachtograndparent")) { return; } diff --git a/Content.Server/GlobalVerbs/AttachToGridVerb.cs b/Content.Server/GlobalVerbs/AttachToGridVerb.cs index f803f9e2d3..c50119e5f7 100644 --- a/Content.Server/GlobalVerbs/AttachToGridVerb.cs +++ b/Content.Server/GlobalVerbs/AttachToGridVerb.cs @@ -19,13 +19,13 @@ namespace Content.Server.GlobalVerbs return; } - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "attachtogrid")) + if (!groupController.CanCommand(actor.PlayerSession, "attachtogrid")) { return; } @@ -37,13 +37,13 @@ namespace Content.Server.GlobalVerbs public override void Activate(IEntity user, IEntity target) { - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "attachtogrid")) + if (!groupController.CanCommand(actor.PlayerSession, "attachtogrid")) { return; } diff --git a/Content.Server/GlobalVerbs/AttachToSelf.cs b/Content.Server/GlobalVerbs/AttachToSelf.cs index 1862621526..f37c3a49fa 100644 --- a/Content.Server/GlobalVerbs/AttachToSelf.cs +++ b/Content.Server/GlobalVerbs/AttachToSelf.cs @@ -19,13 +19,13 @@ namespace Content.Server.GlobalVerbs return; } - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "attachtoself")) + if (!groupController.CanCommand(actor.PlayerSession, "attachtoself")) { return; } @@ -37,13 +37,13 @@ namespace Content.Server.GlobalVerbs public override void Activate(IEntity user, IEntity target) { - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "attachtoself")) + if (!groupController.CanCommand(actor.PlayerSession, "attachtoself")) { return; } diff --git a/Content.Server/GlobalVerbs/ControlMobVerb.cs b/Content.Server/GlobalVerbs/ControlMobVerb.cs index e051ec19fc..58583a9da5 100644 --- a/Content.Server/GlobalVerbs/ControlMobVerb.cs +++ b/Content.Server/GlobalVerbs/ControlMobVerb.cs @@ -26,14 +26,14 @@ namespace Content.Server.GlobalVerbs return; } - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { if (!user.HasComponent() || !target.HasComponent()) { return; } - if (groupController.CanCommand(player.playerSession, "controlmob")) + if (groupController.CanCommand(player.PlayerSession, "controlmob")) { data.Visibility = VerbVisibility.Visible; data.Text = Loc.GetString("Control Mob"); @@ -46,7 +46,7 @@ namespace Content.Server.GlobalVerbs { var groupController = IoCManager.Resolve(); - var player = user.GetComponent().playerSession; + var player = user.GetComponent().PlayerSession; if (!groupController.CanCommand(player, "controlmob")) { return; diff --git a/Content.Server/GlobalVerbs/DeleteVerb.cs b/Content.Server/GlobalVerbs/DeleteVerb.cs index aa8764e429..553aac2eb1 100644 --- a/Content.Server/GlobalVerbs/DeleteVerb.cs +++ b/Content.Server/GlobalVerbs/DeleteVerb.cs @@ -20,12 +20,12 @@ namespace Content.Server.GlobalVerbs var groupController = IoCManager.Resolve(); - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } - if (!groupController.CanCommand(actor.playerSession, "deleteentity")) + if (!groupController.CanCommand(actor.PlayerSession, "deleteentity")) { return; } @@ -40,12 +40,12 @@ namespace Content.Server.GlobalVerbs { var groupController = IoCManager.Resolve(); - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } - if (!groupController.CanCommand(actor.playerSession, "deleteentity")) + if (!groupController.CanCommand(actor.PlayerSession, "deleteentity")) { return; } diff --git a/Content.Server/GlobalVerbs/InRangeUnoccludedVerb.cs b/Content.Server/GlobalVerbs/InRangeUnoccludedVerb.cs index a7b2177165..04d2057c50 100644 --- a/Content.Server/GlobalVerbs/InRangeUnoccludedVerb.cs +++ b/Content.Server/GlobalVerbs/InRangeUnoccludedVerb.cs @@ -18,13 +18,13 @@ namespace Content.Server.GlobalVerbs { data.Visibility = VerbVisibility.Invisible; - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "inrangeunoccluded")) + if (!groupController.CanCommand(actor.PlayerSession, "inrangeunoccluded")) { return; } @@ -36,13 +36,13 @@ namespace Content.Server.GlobalVerbs public override void Activate(IEntity user, IEntity target) { - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(actor.playerSession, "inrangeunoccluded")) + if (!groupController.CanCommand(actor.PlayerSession, "inrangeunoccluded")) { return; } diff --git a/Content.Server/GlobalVerbs/MakeGhostRoleVerb.cs b/Content.Server/GlobalVerbs/MakeGhostRoleVerb.cs index be4e3c5c67..e9b8017ca5 100644 --- a/Content.Server/GlobalVerbs/MakeGhostRoleVerb.cs +++ b/Content.Server/GlobalVerbs/MakeGhostRoleVerb.cs @@ -28,8 +28,8 @@ namespace Content.Server.GlobalVerbs return; } - if (!user.TryGetComponent(out IActorComponent? actor) || - !groupController.CanCommand(actor.playerSession, "makeghostrole")) + if (!user.TryGetComponent(out ActorComponent? actor) || + !groupController.CanCommand(actor.PlayerSession, "makeghostrole")) { return; } @@ -49,14 +49,14 @@ namespace Content.Server.GlobalVerbs return; } - if (!user.TryGetComponent(out IActorComponent? actor) || - !groupController.CanCommand(actor.playerSession, "makeghostrole")) + if (!user.TryGetComponent(out ActorComponent? actor) || + !groupController.CanCommand(actor.PlayerSession, "makeghostrole")) { return; } var ghostRoleSystem = EntitySystem.Get(); - ghostRoleSystem.OpenMakeGhostRoleEui(actor.playerSession, target.Uid); + ghostRoleSystem.OpenMakeGhostRoleEui(actor.PlayerSession, target.Uid); } } } diff --git a/Content.Server/GlobalVerbs/MakeSentientVerb.cs b/Content.Server/GlobalVerbs/MakeSentientVerb.cs index d96866eba4..7c4039afe6 100644 --- a/Content.Server/GlobalVerbs/MakeSentientVerb.cs +++ b/Content.Server/GlobalVerbs/MakeSentientVerb.cs @@ -25,7 +25,7 @@ namespace Content.Server.GlobalVerbs if (user == target || target.HasComponent()) return; - var player = user.GetComponent().playerSession; + var player = user.GetComponent().PlayerSession; if (groupController.CanCommand(player, "makesentient")) { data.Visibility = VerbVisibility.Visible; @@ -39,7 +39,7 @@ namespace Content.Server.GlobalVerbs { var groupController = IoCManager.Resolve(); - var player = user.GetComponent().playerSession; + var player = user.GetComponent().PlayerSession; if (!groupController.CanCommand(player, "makesentient")) return; diff --git a/Content.Server/GlobalVerbs/PointingVerb.cs b/Content.Server/GlobalVerbs/PointingVerb.cs index b2384cf95f..db89cb23cd 100644 --- a/Content.Server/GlobalVerbs/PointingVerb.cs +++ b/Content.Server/GlobalVerbs/PointingVerb.cs @@ -20,7 +20,7 @@ namespace Content.Server.GlobalVerbs data.Visibility = VerbVisibility.Invisible; data.IconTexture = "/Textures/Interface/VerbIcons/point.svg.192dpi.png"; - if (!user.HasComponent()) + if (!user.HasComponent()) { return; } @@ -42,12 +42,12 @@ namespace Content.Server.GlobalVerbs public override void Activate(IEntity user, IEntity target) { - if (!user.TryGetComponent(out IActorComponent? actor)) + if (!user.TryGetComponent(out ActorComponent? actor)) { return; } - EntitySystem.Get().TryPoint(actor.playerSession, target.Transform.Coordinates, target.Uid); + EntitySystem.Get().TryPoint(actor.PlayerSession, target.Transform.Coordinates, target.Uid); } } } diff --git a/Content.Server/GlobalVerbs/RejuvenateVerb.cs b/Content.Server/GlobalVerbs/RejuvenateVerb.cs index 32b6c4e74c..ced66261cd 100644 --- a/Content.Server/GlobalVerbs/RejuvenateVerb.cs +++ b/Content.Server/GlobalVerbs/RejuvenateVerb.cs @@ -30,7 +30,7 @@ namespace Content.Server.GlobalVerbs var groupController = IoCManager.Resolve(); - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { if (!target.HasComponent() && !target.HasComponent() && !target.HasComponent()) @@ -38,7 +38,7 @@ namespace Content.Server.GlobalVerbs return; } - if (groupController.CanCommand(player.playerSession, "rejuvenate")) + if (groupController.CanCommand(player.PlayerSession, "rejuvenate")) { data.Visibility = VerbVisibility.Visible; } @@ -48,9 +48,9 @@ namespace Content.Server.GlobalVerbs public override void Activate(IEntity user, IEntity target) { var groupController = IoCManager.Resolve(); - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { - if (groupController.CanCommand(player.playerSession, "rejuvenate")) + if (groupController.CanCommand(player.PlayerSession, "rejuvenate")) PerformRejuvenate(target); } } diff --git a/Content.Server/GlobalVerbs/SetAnchorVerb.cs b/Content.Server/GlobalVerbs/SetAnchorVerb.cs index 52306028a0..0373b45519 100644 --- a/Content.Server/GlobalVerbs/SetAnchorVerb.cs +++ b/Content.Server/GlobalVerbs/SetAnchorVerb.cs @@ -21,14 +21,14 @@ namespace Content.Server.GlobalVerbs var groupController = IoCManager.Resolve(); - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { if (!target.TryGetComponent(out PhysicsComponent? physics)) { return; } - if (groupController.CanCommand(player.playerSession, "setanchor")) + if (groupController.CanCommand(player.PlayerSession, "setanchor")) { data.Text = physics.Anchored ? "Unanchor" : "Anchor"; data.Visibility = VerbVisibility.Visible; @@ -38,10 +38,10 @@ namespace Content.Server.GlobalVerbs public override void Activate(IEntity user, IEntity target) { - if (user.TryGetComponent(out var player)) + if (user.TryGetComponent(out var player)) { var groupController = IoCManager.Resolve(); - if (!groupController.CanCommand(player.playerSession, "setanchor")) + if (!groupController.CanCommand(player.PlayerSession, "setanchor")) return; if (target.TryGetComponent(out PhysicsComponent? physics)) diff --git a/Content.Server/Mobs/Mind.cs b/Content.Server/Mobs/Mind.cs index a2ab3c72d3..c2cc2358e5 100644 --- a/Content.Server/Mobs/Mind.cs +++ b/Content.Server/Mobs/Mind.cs @@ -213,10 +213,10 @@ namespace Content.Server.Mobs throw new ArgumentException("That entity already has a mind.", nameof(entity)); } - if (entity.TryGetComponent(out IActorComponent? actor)) + if (entity.TryGetComponent(out ActorComponent? actor)) { // Happens when transferring to your currently visited entity. - if (actor.playerSession != Session) + if (actor.PlayerSession != Session) { throw new ArgumentException("Visit target already has a session.", nameof(entity)); } diff --git a/Content.Server/Physics/Controllers/SingularityController.cs b/Content.Server/Physics/Controllers/SingularityController.cs index 423116e2fd..b7336f3d53 100644 --- a/Content.Server/Physics/Controllers/SingularityController.cs +++ b/Content.Server/Physics/Controllers/SingularityController.cs @@ -47,7 +47,7 @@ namespace Content.Server.Physics.Controllers foreach (var (singularity, physics) in ComponentManager.EntityQuery()) { - if (singularity.Owner.HasComponent()) continue; + if (singularity.Owner.HasComponent()) continue; // TODO: Need to essentially use a push vector in a random direction for us PLUS // Any entity colliding with our larger circlebox needs to have an impulse applied to itself. diff --git a/Content.Server/ServerNotifyManager.cs b/Content.Server/ServerNotifyManager.cs index e7a5e2e58f..7ce782aa5f 100644 --- a/Content.Server/ServerNotifyManager.cs +++ b/Content.Server/ServerNotifyManager.cs @@ -28,7 +28,7 @@ namespace Content.Server public override void PopupMessage(IEntity source, IEntity viewer, string message) { - if (!viewer.TryGetComponent(out IActorComponent? actor)) + if (!viewer.TryGetComponent(out ActorComponent? actor)) { return; } @@ -37,12 +37,12 @@ namespace Content.Server netMessage.Entity = source.Uid; netMessage.Message = message; - _netManager.ServerSendMessage(netMessage, actor.playerSession.ConnectedClient); + _netManager.ServerSendMessage(netMessage, actor.PlayerSession.ConnectedClient); } public override void PopupMessage(EntityCoordinates coordinates, IEntity viewer, string message) { - if (!viewer.TryGetComponent(out IActorComponent? actor)) + if (!viewer.TryGetComponent(out ActorComponent? actor)) { return; } @@ -51,12 +51,12 @@ namespace Content.Server netMessage.Coordinates = coordinates; netMessage.Message = message; - _netManager.ServerSendMessage(netMessage, actor.playerSession.ConnectedClient); + _netManager.ServerSendMessage(netMessage, actor.PlayerSession.ConnectedClient); } public override void PopupMessageCursor(IEntity viewer, string message) { - if (!viewer.TryGetComponent(out IActorComponent? actor)) + if (!viewer.TryGetComponent(out ActorComponent? actor)) { return; } @@ -64,7 +64,7 @@ namespace Content.Server var netMessage = _netManager.CreateNetMessage(); netMessage.Message = message; - _netManager.ServerSendMessage(netMessage, actor.playerSession.ConnectedClient); + _netManager.ServerSendMessage(netMessage, actor.PlayerSession.ConnectedClient); } } }