Move static container helper functions to container system (#6382)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Leon Friedrich
2022-01-31 20:08:53 +13:00
committed by GitHub
parent af13751600
commit 4614bb9877
9 changed files with 25 additions and 28 deletions

View File

@@ -2,7 +2,6 @@ using Content.Shared.Examine;
using JetBrains.Annotations;
using Robust.Server.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Utility;
@@ -24,8 +23,6 @@ namespace Content.Server.Examine
base.Initialize();
SubscribeNetworkEvent<ExamineSystemMessages.RequestExamineInfoMessage>(ExamineInfoRequest);
IoCManager.InjectDependencies(this);
}
private void ExamineInfoRequest(ExamineSystemMessages.RequestExamineInfoMessage request, EntitySessionEventArgs eventArgs)

View File

@@ -297,7 +297,7 @@ namespace Content.Server.Interaction
if (!wideAttack)
{
// Check if interacted entity is in the same container, the direct child, or direct parent of the user.
if (target != null && !Deleted(target.Value) && !user.IsInSameOrParentContainer(target.Value) && !CanAccessViaStorage(user, target.Value))
if (target != null && !Deleted(target.Value) && !ContainerSystem.IsInSameOrParentContainer(user, target.Value) && !CanAccessViaStorage(user, target.Value))
{
Logger.WarningS("system.interaction",
$"User entity {ToPrettyString(user):user} clicked on object {ToPrettyString(target.Value):target} that isn't the parent, child, or in the same container");