From 07e11dda25dd1324f864c43b56e0416017bf9a8c Mon Sep 17 00:00:00 2001 From: pathetic meowmeow Date: Mon, 24 Feb 2025 01:33:22 -0500 Subject: [PATCH] Port respawning from Frontierstation/Corvax (#3021) --- .../Systems/Ghost/GhostUIController.cs | 50 ++++++ .../Systems/Ghost/Widgets/GhostGui.xaml | 1 + .../Systems/Ghost/Widgets/GhostGui.xaml.cs | 37 +++++ .../_Corvax/Respawn/RespawnSystem.cs | 22 +++ .../Controls/GhostRespawnRulesWindow.xaml | 25 +++ .../Controls/GhostRespawnRulesWindow.xaml.cs | 29 ++++ .../_Corvax/Respawn/RespawnSystem.cs | 151 ++++++++++++++++++ .../_NF/Commands/GhostRespawnCommand.cs | 71 ++++++++ .../_Corvax/Respawn/RespawnResetEvent.cs | 9 ++ Content.Shared/_NF/CCVar/NFCCVars.cs | 28 ++++ .../en-US/_NF/respawn/respawn-system.ftl | 16 ++ 11 files changed, 439 insertions(+) create mode 100644 Content.Client/_Corvax/Respawn/RespawnSystem.cs create mode 100644 Content.Client/_NF/UserInterface/Systems/Ghost/Controls/GhostRespawnRulesWindow.xaml create mode 100644 Content.Client/_NF/UserInterface/Systems/Ghost/Controls/GhostRespawnRulesWindow.xaml.cs create mode 100644 Content.Server/_Corvax/Respawn/RespawnSystem.cs create mode 100644 Content.Server/_NF/Commands/GhostRespawnCommand.cs create mode 100644 Content.Shared/_Corvax/Respawn/RespawnResetEvent.cs create mode 100644 Content.Shared/_NF/CCVar/NFCCVars.cs create mode 100644 Resources/Locale/en-US/_NF/respawn/respawn-system.ftl diff --git a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs index 53779ea41c..04eb6018c4 100644 --- a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs +++ b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs @@ -3,8 +3,13 @@ using Content.Client.Ghost; using Content.Client.UserInterface.Systems.Gameplay; using Content.Client.UserInterface.Systems.Ghost.Widgets; using Content.Shared.Ghost; +using Robust.Client.Console; // Frontier +using Robust.Shared.Console; // Frontier using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controllers; +using Content.Client._Corvax.Respawn; // Frontier +using Content.Shared._NF.CCVar; // Frontier +using Robust.Shared.Configuration; // Frontier namespace Content.Client.UserInterface.Systems.Ghost; @@ -12,8 +17,11 @@ namespace Content.Client.UserInterface.Systems.Ghost; public sealed class GhostUIController : UIController, IOnSystemChanged { [Dependency] private readonly IEntityNetworkManager _net = default!; + [Dependency] private readonly IConsoleHost _consoleHost = default!; // Frontier + [Dependency] private readonly IConfigurationManager _cfg = default!; // Frontier [UISystemDependency] private readonly GhostSystem? _system = default; + [UISystemDependency] private readonly RespawnSystem? _respawn = default; // Frontier private GhostGui? Gui => UIManager.GetActiveUIWidgetOrNull(); @@ -56,6 +64,24 @@ public sealed class GhostUIController : UIController, IOnSystemChanged().RemoteExecuteCommand(null, "ghostrespawn"); + } + // End Frontier } diff --git a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml index 0f65debb4e..3f111264ee 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml +++ b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml @@ -5,5 +5,6 @@