From e72393df712cb2f5d1b4f6b4e2dc417c5584f07a Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:30:49 -0400 Subject: [PATCH] Fix arcade machines (#30376) --- Content.Client/Arcade/BlockGameMenu.cs | 2 +- Content.Client/Arcade/UI/BlockGameBoundUserInterface.cs | 1 + .../Arcade/UI/SpaceVillainArcadeBoundUserInterface.cs | 1 + Content.Server/Arcade/BlockGame/BlockGame.Ui.cs | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Content.Client/Arcade/BlockGameMenu.cs b/Content.Client/Arcade/BlockGameMenu.cs index 4a579fc4bf..ad360c5439 100644 --- a/Content.Client/Arcade/BlockGameMenu.cs +++ b/Content.Client/Arcade/BlockGameMenu.cs @@ -380,7 +380,7 @@ namespace Content.Client.Arcade { PanelOverride = back, HorizontalExpand = true, - SizeFlagsStretchRatio = 60 + SizeFlagsStretchRatio = 34.25f }; var backgroundPanel = new PanelContainer { diff --git a/Content.Client/Arcade/UI/BlockGameBoundUserInterface.cs b/Content.Client/Arcade/UI/BlockGameBoundUserInterface.cs index 8fa8035afd..4f08e6bd0a 100644 --- a/Content.Client/Arcade/UI/BlockGameBoundUserInterface.cs +++ b/Content.Client/Arcade/UI/BlockGameBoundUserInterface.cs @@ -17,6 +17,7 @@ public sealed class BlockGameBoundUserInterface : BoundUserInterface base.Open(); _menu = this.CreateWindow(); + _menu.OnAction += SendAction; } protected override void ReceiveMessage(BoundUserInterfaceMessage message) diff --git a/Content.Client/Arcade/UI/SpaceVillainArcadeBoundUserInterface.cs b/Content.Client/Arcade/UI/SpaceVillainArcadeBoundUserInterface.cs index c0704530de..8fff406e86 100644 --- a/Content.Client/Arcade/UI/SpaceVillainArcadeBoundUserInterface.cs +++ b/Content.Client/Arcade/UI/SpaceVillainArcadeBoundUserInterface.cs @@ -25,6 +25,7 @@ public sealed class SpaceVillainArcadeBoundUserInterface : BoundUserInterface base.Open(); _menu = this.CreateWindow(); + _menu.OnPlayerAction += SendAction; } protected override void ReceiveMessage(BoundUserInterfaceMessage message) diff --git a/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs b/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs index cd22f1f6d3..943fb75525 100644 --- a/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs +++ b/Content.Server/Arcade/BlockGame/BlockGame.Ui.cs @@ -157,7 +157,7 @@ public sealed partial class BlockGame /// The message to broadcase to all players/spectators. private void SendMessage(BoundUserInterfaceMessage message) { - _uiSystem.ServerSendUiMessage(_entityManager.GetEntity(message.Entity), BlockGameUiKey.Key, message); + _uiSystem.ServerSendUiMessage(_owner, BlockGameUiKey.Key, message); } /// @@ -167,7 +167,7 @@ public sealed partial class BlockGame /// The target recipient. private void SendMessage(BoundUserInterfaceMessage message, EntityUid actor) { - _uiSystem.ServerSendUiMessage(_entityManager.GetEntity(message.Entity), BlockGameUiKey.Key, message, actor); + _uiSystem.ServerSendUiMessage(_owner, BlockGameUiKey.Key, message, actor); } ///