Stop using some obsolete stuff (#4657)
This commit is contained in:
@@ -77,7 +77,7 @@ namespace Content.Client.ContextMenu.UI
|
||||
AddToUI(orderedStates);
|
||||
|
||||
_userInterfaceManager.ModalRoot.AddChild(rootContextMenu);
|
||||
var size = rootContextMenu.List.CombinedMinimumSize;
|
||||
var size = rootContextMenu.List.DesiredSize;
|
||||
var box = UIBox2.FromDimensions(_userInterfaceManager.MousePositionScaled.Position, size);
|
||||
rootContextMenu.Open(box);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ namespace Content.Client.ContextMenu.UI
|
||||
AddToUI(orderedStates, stack);
|
||||
|
||||
_userInterfaceManager.ModalRoot.AddChild(childContextMenu);
|
||||
var size = childContextMenu.List.CombinedMinimumSize;
|
||||
var size = childContextMenu.List.DesiredSize;
|
||||
childContextMenu.Open(UIBox2.FromDimensions(position + (stack.Width, 0), size));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using Content.Shared.Examine;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -64,11 +65,8 @@ namespace Content.Client.Suspicion
|
||||
continue;
|
||||
}
|
||||
|
||||
// all entities have a TransformComponent
|
||||
var transform = physics.Owner.Transform;
|
||||
|
||||
// if not on the same map, continue
|
||||
if (transform.MapID != _eyeManager.CurrentMap || !transform.IsMapTransform)
|
||||
if (physics.Owner.Transform.MapID != _eyeManager.CurrentMap || physics.Owner.IsInContainer())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ using Robust.Client.State;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -145,7 +146,7 @@ namespace Content.Client.Viewport
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
if (entity.TryGetComponent<ClickableComponent>(out var component)
|
||||
&& entity.Transform.IsMapTransform
|
||||
&& !entity.IsInContainer()
|
||||
&& component.CheckClick(coordinates.Position, out var drawDepthClicked, out var renderOrder))
|
||||
{
|
||||
foundEntities.Add((entity, drawDepthClicked, renderOrder));
|
||||
|
||||
Reference in New Issue
Block a user