Audio and other misc replay related changes (#3471)

This commit is contained in:
Leon Friedrich
2022-11-22 13:49:59 +13:00
committed by GitHub
parent d87963206c
commit 7b59fbd3ef
19 changed files with 428 additions and 35 deletions

View File

@@ -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