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 @@