Replays: final boss (#17621)
* Replays: final boss * Undo formatting change in EntryPoint
This commit is contained in:
committed by
GitHub
parent
204f6ca5c2
commit
bbd8ce8885
@@ -27,12 +27,16 @@ using Content.Shared.Localizations;
|
||||
using Robust.Client;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.Replays.Loading;
|
||||
using Robust.Client.Replays.Playback;
|
||||
using Robust.Client.State;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Shared;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Replays;
|
||||
|
||||
namespace Content.Client.Entry
|
||||
{
|
||||
@@ -64,6 +68,9 @@ namespace Content.Client.Entry
|
||||
[Dependency] private readonly JobRequirementsManager _jobRequirements = default!;
|
||||
[Dependency] private readonly ContentLocalizationManager _contentLoc = default!;
|
||||
[Dependency] private readonly ContentReplayPlaybackManager _playbackMan = default!;
|
||||
[Dependency] private readonly IResourceManager _resourceManager = default!;
|
||||
[Dependency] private readonly IReplayLoadManager _replayLoad = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
@@ -183,7 +190,20 @@ namespace Content.Client.Entry
|
||||
{
|
||||
// Fire off into state dependent on launcher or not.
|
||||
|
||||
if (_gameController.LaunchState.FromLauncher)
|
||||
// Check if we're loading a replay via content bundle!
|
||||
if (_configManager.GetCVar(CVars.LaunchContentBundle)
|
||||
&& _resourceManager.ContentFileExists(
|
||||
ReplayConstants.ReplayZipFolder.ToRootedPath() / ReplayConstants.FileMeta))
|
||||
{
|
||||
_logManager.GetSawmill("entry").Info("Loading content bundle replay from VFS!");
|
||||
|
||||
var reader = new ReplayFileReaderResources(
|
||||
_resourceManager,
|
||||
ReplayConstants.ReplayZipFolder.ToRootedPath());
|
||||
|
||||
_replayLoad.LoadAndStartReplay(reader);
|
||||
}
|
||||
else if (_gameController.LaunchState.FromLauncher)
|
||||
{
|
||||
_stateManager.RequestStateChange<LauncherConnecting>();
|
||||
var state = (LauncherConnecting) _stateManager.CurrentState;
|
||||
|
||||
Reference in New Issue
Block a user