From 55f94114933d274f9b1359f24ee455e2b359e771 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 25 Aug 2019 22:53:36 +0200 Subject: [PATCH] Verbs don't open an invisible popup if there's no entities. --- Content.Client/GameObjects/EntitySystems/VerbSystem.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs index 7e2d7cc85f..422220e9d5 100644 --- a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs @@ -91,6 +91,11 @@ namespace Content.Client.GameObjects.EntitySystems var entities = gameScreen.GetEntitiesUnderPosition(args.Coordinates); + if (entities.Count == 0) + { + return; + } + _currentPopup = new VerbPopup(); _currentPopup.OnPopupHide += _closeContextMenu; foreach (var entity in entities)