Un-revert IPlayerManager refactor (#21244)
This commit is contained in:
@@ -3,8 +3,8 @@ using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Content.Server.Administration.Logs.Converters;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Administration.Logs;
|
||||
|
||||
@@ -44,7 +44,7 @@ public sealed partial class AdminLogManager
|
||||
var value = properties[key];
|
||||
value = value switch
|
||||
{
|
||||
IPlayerSession player => new SerializablePlayer(player),
|
||||
ICommonSession player => new SerializablePlayer(player),
|
||||
EntityCoordinates entityCoordinates => new SerializableEntityCoordinates(_entityManager, entityCoordinates),
|
||||
_ => value
|
||||
};
|
||||
@@ -56,7 +56,7 @@ public sealed partial class AdminLogManager
|
||||
{
|
||||
EntityUid id => id,
|
||||
EntityStringRepresentation rep => rep.Uid,
|
||||
IPlayerSession {AttachedEntity: {Valid: true}} session => session.AttachedEntity,
|
||||
ICommonSession {AttachedEntity: {Valid: true}} session => session.AttachedEntity,
|
||||
IComponent component => component.Owner,
|
||||
_ => null
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Administration.Logs.Converters;
|
||||
|
||||
@@ -36,9 +36,9 @@ public sealed class PlayerSessionConverter : AdminLogConverter<SerializablePlaye
|
||||
|
||||
public readonly struct SerializablePlayer
|
||||
{
|
||||
public readonly IPlayerSession Player;
|
||||
public readonly ICommonSession Player;
|
||||
|
||||
public SerializablePlayer(IPlayerSession player)
|
||||
public SerializablePlayer(ICommonSession player)
|
||||
{
|
||||
Player = player;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user