Add support for client-side replays (#17168)

This commit is contained in:
Leon Friedrich
2023-06-19 05:23:31 +12:00
committed by GitHub
parent cc81a7511b
commit b03d9a90ab
22 changed files with 183 additions and 91 deletions

View File

@@ -22,6 +22,7 @@ using Robust.Client.State;
using Robust.Client.Timing;
using Robust.Client.UserInterface;
using Robust.Shared.ContentPack;
using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Utility;
namespace Content.Client.Replay;
@@ -99,6 +100,8 @@ public sealed class ContentReplayPlaybackManager
{
switch (message)
{
case BoundUserInterfaceMessage:
break; // TODO REPLAYS refactor BUIs
case ChatMessage chat:
// Just pass on the chat message to the UI controller, but skip speech-bubbles if we are fast-forwarding.
_uiMan.GetUIController<ChatUIController>().ProcessChatMessage(chat, speechBubble: !skipEffects);
@@ -129,8 +132,7 @@ public sealed class ContentReplayPlaybackManager
return false;
}
private void OnReplayPlaybackStarted()
private void OnReplayPlaybackStarted(MappingDataNode metadata, List<object> objects)
{
_conGrp.Implementation = new ReplayConGroup();
}