mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Audio and other misc replay related changes (#3471)
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Prometheus;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -516,6 +517,18 @@ namespace Robust.Server.Player
|
||||
{
|
||||
return _playerData.ContainsKey(userId);
|
||||
}
|
||||
|
||||
public bool TryGetSessionByEntity(EntityUid uid, [NotNullWhen(true)] out ICommonSession? session)
|
||||
{
|
||||
if (!_entityManager.TryGetComponent(uid, out ActorComponent? actor))
|
||||
{
|
||||
session = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
session = actor.PlayerSession;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SessionStatusEventArgs : EventArgs
|
||||
|
||||
Reference in New Issue
Block a user