Revert "Update submodule to 172.0.0 (#21222)" (#21225)

This commit is contained in:
metalgearsloth
2023-10-24 21:55:20 +11:00
committed by GitHub
parent 517aea8bc3
commit a2bbda43cc
249 changed files with 1049 additions and 967 deletions

View File

@@ -1,6 +1,6 @@
using System.Numerics;
using Robust.Server.Player;
using Robust.Shared.Map;
using Robust.Shared.Player;
namespace Content.Server.Tabletop
{
@@ -17,7 +17,7 @@ namespace Content.Server.Tabletop
/// <summary>
/// The set of players currently playing this tabletop game.
/// </summary>
public readonly Dictionary<ICommonSession, TabletopSessionPlayerData> Players = new();
public readonly Dictionary<IPlayerSession, TabletopSessionPlayerData> Players = new();
/// <summary>
/// All entities bound to this session. If you create an entity for this session, you have to add it here.

View File

@@ -1,7 +1,7 @@
using System.Numerics;
using Content.Server.Tabletop.Components;
using Content.Shared.Tabletop.Events;
using Robust.Shared.Player;
using Robust.Server.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(ICommonSession player, EntityUid uid)
public void OpenSessionFor(IPlayerSession 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(ICommonSession player, EntityUid uid, bool removeGamerComponent = true)
public void CloseSessionFor(IPlayerSession 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, ICommonSession player, Vector2 offset = default)
private EntityUid CreateCamera(TabletopGameComponent tabletop, IPlayerSession player, Vector2 offset = default)
{
DebugTools.AssertNotNull(tabletop.Session);

View File

@@ -9,6 +9,7 @@ using Content.Shared.Tabletop.Events;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Utility;
@@ -41,7 +42,7 @@ namespace Content.Server.Tabletop
private void OnTabletopRequestTakeOut(TabletopRequestTakeOut msg, EntitySessionEventArgs args)
{
if (args.SenderSession is not { } playerSession)
if (args.SenderSession is not IPlayerSession playerSession)
return;
var table = GetEntity(msg.TableUid);
@@ -104,7 +105,7 @@ namespace Content.Server.Tabletop
protected override void OnTabletopMove(TabletopMoveEvent msg, EntitySessionEventArgs args)
{
if (args.SenderSession is not { } playerSession)
if (args.SenderSession is not IPlayerSession playerSession)
return;
if (!TryComp(GetEntity(msg.TableUid), out TabletopGameComponent? tabletop) || tabletop.Session is not { } session)
@@ -154,7 +155,7 @@ namespace Content.Server.Tabletop
private void OnStopPlaying(TabletopStopPlayingEvent msg, EntitySessionEventArgs args)
{
CloseSessionFor(args.SenderSession, GetEntity(msg.TableUid));
CloseSessionFor((IPlayerSession)args.SenderSession, GetEntity(msg.TableUid));
}
private void OnPlayerDetached(EntityUid uid, TabletopGamerComponent component, PlayerDetachedEvent args)