From 46f13da26ddf834c879efa1d6c5b5502bff9579b Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Thu, 23 Jul 2020 00:56:30 +0200 Subject: [PATCH] Fix verb menu not working for clientside entities (#1400) Co-authored-by: Pieter-Jan Briers --- Content.Client/GameObjects/EntitySystems/VerbSystem.cs | 7 +++++-- Content.Server/GameObjects/EntitySystems/VerbSystem.cs | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs index 2d55a2b5a1..9ec0ada247 100644 --- a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs @@ -94,8 +94,11 @@ namespace Content.Client.GameObjects.EntitySystems _userInterfaceManager.ModalRoot.AddChild(_currentVerbListRoot); _currentVerbListRoot.OnPopupHide += CloseVerbMenu; - _currentVerbListRoot.List.AddChild(new Label {Text = "Waiting on Server..."}); - RaiseNetworkEvent(new VerbSystemMessages.RequestVerbsMessage(_currentEntity)); + if (!entity.Uid.IsClientSide()) + { + _currentVerbListRoot.List.AddChild(new Label {Text = "Waiting on Server..."}); + RaiseNetworkEvent(new VerbSystemMessages.RequestVerbsMessage(_currentEntity)); + } var box = UIBox2.FromDimensions(screenCoordinates.Position, (1, 1)); _currentVerbListRoot.Open(box); diff --git a/Content.Server/GameObjects/EntitySystems/VerbSystem.cs b/Content.Server/GameObjects/EntitySystems/VerbSystem.cs index 047a16c7c6..f2bac2c718 100644 --- a/Content.Server/GameObjects/EntitySystems/VerbSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/VerbSystem.cs @@ -7,6 +7,7 @@ using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.IoC; using static Content.Shared.GameObjects.EntitySystemMessages.VerbSystemMessages; +using Logger = Robust.Shared.Log.Logger; namespace Content.Server.Interfaces.GameObjects.Components.Interaction { @@ -85,6 +86,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Interaction if (!_entityManager.TryGetEntity(req.EntityUid, out var entity)) { + Logger.Warning($"{nameof(RequestVerbs)} called on a nonexistant entity with id {req.EntityUid} by player {player}."); return; }