Un-revert IPlayerManager refactor (#21244)

This commit is contained in:
Leon Friedrich
2023-10-28 09:59:53 +11:00
committed by GitHub
parent c55e1dcafd
commit e685cb626b
245 changed files with 781 additions and 943 deletions

View File

@@ -18,12 +18,11 @@ using Content.Shared.Pulling.Components;
using Content.Shared.Stacks;
using Content.Shared.Storage;
using Content.Shared.Throwing;
using Robust.Server.Player;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Input.Binding;
using Robust.Shared.Map;
using Robust.Shared.Players;
using Robust.Shared.Player;
using Robust.Shared.Utility;
namespace Content.Server.Hands.Systems
@@ -159,9 +158,9 @@ namespace Content.Server.Hands.Systems
#endregion
#region interactions
private bool HandleThrowItem(ICommonSession? session, EntityCoordinates coordinates, EntityUid entity)
private bool HandleThrowItem(ICommonSession? playerSession, EntityCoordinates coordinates, EntityUid entity)
{
if (session is not IPlayerSession playerSession)
if (playerSession == null)
return false;
if (playerSession.AttachedEntity is not {Valid: true} player ||
@@ -220,7 +219,7 @@ namespace Content.Server.Hands.Systems
// TODO: move to storage or inventory
private void HandleSmartEquip(ICommonSession? session, string equipmentSlot)
{
if (session is not IPlayerSession playerSession)
if (session is not { } playerSession)
return;
if (playerSession.AttachedEntity is not {Valid: true} plyEnt || !Exists(plyEnt))