Audio and other misc replay related changes (#3471)

This commit is contained in:
Leon Friedrich
2022-11-22 11:49:59 +11:00
committed by GitHub
parent d87963206c
commit 7b59fbd3ef
19 changed files with 428 additions and 35 deletions
+13
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Robust.Shared.Enums;
using Robust.Shared.GameObjects;
@@ -255,5 +256,17 @@ namespace Robust.Client.Player
PlayerListUpdated?.Invoke(this, EventArgs.Empty);
}
public bool TryGetSessionByEntity(EntityUid uid, [NotNullWhen(true)] out ICommonSession? session)
{
if (LocalPlayer?.ControlledEntity == uid)
{
session = LocalPlayer.Session;
return true;
}
session = null;
return false;
}
}
}