From 4e0cb0b532e8c5e7bb971a577e9a1cbae841804d Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Sat, 21 Sep 2024 13:20:10 +0300 Subject: [PATCH 01/14] =?UTF-8?q?[Port]=20Respawn=20Button=20/=20=D0=9A?= =?UTF-8?q?=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20=D0=A0=D0=B5=D1=81=D0=BF=D0=B0?= =?UTF-8?q?=D0=B2=D0=BD=D0=B0=20(#56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add: respawn button * fix: Loc * fix * fix * fix * fix * Update CVars.cs --- Content.Client/Ghost/GhostSystem.cs | 6 ++ .../Systems/Ghost/GhostUIController.cs | 7 ++ .../Systems/Ghost/Widgets/GhostGui.xaml | 1 + .../Systems/Ghost/Widgets/GhostGui.xaml.cs | 2 + .../GameTicking/GameTicker.GamePreset.cs | 3 + .../GameTicking/GameTicker.Spawning.cs | 78 ++++++++++++++++++ .../_White/Ghost/GhostReturnToRoundSystem.cs | 81 +++++++++++++++++++ Content.Shared/Ghost/SharedGhostSystem.cs | 5 ++ Content.Shared/_White/CVars.cs | 9 +++ .../Locale/en-US/_white/ghost/ghost-gui.ftl | 1 + .../en-US/_white/ghost/ghost-respawn.ftl | 15 ++++ .../Locale/ru-RU/_white/ghost/ghost-gui.ftl | 1 + .../ru-RU/_white/ghost/ghost-respawn.ftl | 16 ++++ Resources/Locale/ru-RU/ghost/ghost-gui.ftl | 16 +--- 14 files changed, 226 insertions(+), 15 deletions(-) create mode 100644 Content.Server/_White/Ghost/GhostReturnToRoundSystem.cs create mode 100644 Resources/Locale/en-US/_white/ghost/ghost-gui.ftl create mode 100644 Resources/Locale/en-US/_white/ghost/ghost-respawn.ftl create mode 100644 Resources/Locale/ru-RU/_white/ghost/ghost-gui.ftl create mode 100644 Resources/Locale/ru-RU/_white/ghost/ghost-respawn.ftl diff --git a/Content.Client/Ghost/GhostSystem.cs b/Content.Client/Ghost/GhostSystem.cs index c42e7cd0e0..4bc6ba4c87 100644 --- a/Content.Client/Ghost/GhostSystem.cs +++ b/Content.Client/Ghost/GhostSystem.cs @@ -181,5 +181,11 @@ public void ToggleGhostVisibility() { GhostVisibility = !GhostVisibility; } + + public void ReturnToRound() // WD EDIT + { + var msg = new GhostReturnToRoundRequest(); + RaiseNetworkEvent(msg); + } } } diff --git a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs index 12d6c65953..3834b35fe7 100644 --- a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs +++ b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs @@ -120,6 +120,7 @@ public void LoadGui() Gui.ReturnToBodyPressed += ReturnToBody; Gui.GhostRolesPressed += GhostRolesPressed; Gui.TargetWindow.WarpClicked += OnWarpClicked; + Gui.ReturnToRoundPressed += ReturnToRound; // WD EDIT UpdateGui(); } @@ -133,6 +134,7 @@ public void UnloadGui() Gui.ReturnToBodyPressed -= ReturnToBody; Gui.GhostRolesPressed -= GhostRolesPressed; Gui.TargetWindow.WarpClicked -= OnWarpClicked; + Gui.ReturnToRoundPressed -= ReturnToRound; // WD EDIT Gui.Hide(); } @@ -142,6 +144,11 @@ private void ReturnToBody() _system?.ReturnToBody(); } + private void ReturnToRound() // WD EDIT + { + _system?.ReturnToRound(); + } + private void RequestWarps() { _system?.RequestWarps(); diff --git a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml index 0f65debb4e..7e1760aa5e 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml +++ b/Content.Client/UserInterface/Systems/Ghost/Widgets/GhostGui.xaml @@ -5,5 +5,6 @@