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

@@ -1,7 +1,7 @@
using System.Numerics;
using Content.Server.Tabletop.Components;
using Content.Shared.Tabletop.Events;
using Robust.Server.Player;
using Robust.Shared.Player;
using Robust.Shared.Utility;
namespace Content.Server.Tabletop
@@ -66,7 +66,7 @@ namespace Content.Server.Tabletop
/// </summary>
/// <param name="player">The player session in question.</param>
/// <param name="uid">The UID of the tabletop game entity.</param>
public void OpenSessionFor(IPlayerSession player, EntityUid uid)
public void OpenSessionFor(ICommonSession player, EntityUid uid)
{
if (!EntityManager.TryGetComponent(uid, out TabletopGameComponent? tabletop) || player.AttachedEntity is not {Valid: true} attachedEntity)
return;
@@ -98,7 +98,7 @@ namespace Content.Server.Tabletop
/// <param name="player">The player in question.</param>
/// <param name="uid">The UID of the tabletop game entity.</param>
/// <param name="removeGamerComponent">Whether to remove the <see cref="TabletopGamerComponent"/> from the player's attached entity.</param>
public void CloseSessionFor(IPlayerSession player, EntityUid uid, bool removeGamerComponent = true)
public void CloseSessionFor(ICommonSession player, EntityUid uid, bool removeGamerComponent = true)
{
if (!EntityManager.TryGetComponent(uid, out TabletopGameComponent? tabletop) || tabletop.Session is not { } session)
return;
@@ -129,7 +129,7 @@ namespace Content.Server.Tabletop
/// <param name="player">The player in question.</param>
/// <param name="offset">An offset from the tabletop position for the camera. Zero by default.</param>
/// <returns>The UID of the camera entity.</returns>
private EntityUid CreateCamera(TabletopGameComponent tabletop, IPlayerSession player, Vector2 offset = default)
private EntityUid CreateCamera(TabletopGameComponent tabletop, ICommonSession player, Vector2 offset = default)
{
DebugTools.AssertNotNull(tabletop.Session);