]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix entity group menu
authorAlexis Ehret <git@08a.re>
Tue, 21 Feb 2023 13:13:05 +0000 (14:13 +0100)
committerAlexis Ehret <git@08a.re>
Tue, 21 Feb 2023 13:13:05 +0000 (14:13 +0100)
Before this commit the entity submenu was always the submenu of the
first entity in the group. Now the submenu is uniq to the current entity
selected.

Content.Client/ContextMenu/UI/EntityMenuUIController.cs

index 21ebd8e74eefe0b97a6aad487e8da70158611fed..b33366ee63dd14e345236617f884515cf4da6220 100644 (file)
@@ -260,7 +260,7 @@ namespace Content.Client.ContextMenu.UI
             {
                 var subElement = new EntityMenuElement(entity);
                 subElement.SubMenu = new ContextMenuPopup(_context, subElement);
-                subElement.SubMenu.OnPopupOpen += () => _verb.OpenVerbMenu(group[0], popup: subElement.SubMenu);
+                subElement.SubMenu.OnPopupOpen += () => _verb.OpenVerbMenu(entity, popup: subElement.SubMenu);
                 subElement.SubMenu.OnPopupHide += subElement.SubMenu.MenuBody.DisposeAllChildren;
                 _context.AddElement(subMenu, subElement);
                 Elements.TryAdd(entity, subElement);