using Robust.Shared.Player;
namespace Content.Shared.Players;
public static class PlayerDataExt
{
///
/// Gets the correctly cast instance of content player data from an engine player data storage.
///
public static ContentPlayerData? ContentData(this SessionData data)
{
return (ContentPlayerData?) data.ContentDataUncast;
}
///
/// Gets the correctly cast instance of content player data from an engine player data storage.
///
public static ContentPlayerData? ContentData(this ICommonSession session)
{
return session.Data.ContentData();
}
///
/// Gets the mind that is associated with this player.
///
public static EntityUid? GetMind(this ICommonSession session)
{
return session.Data.ContentData()?.Mind;
}
}