Fix being able to fill beakers through walls (#4103)

This commit is contained in:
mirrorcult
2021-05-28 02:20:16 -07:00
committed by GitHub
parent e3b51d4abb
commit 3ba0c01e4f

View File

@@ -4,6 +4,7 @@ using Content.Shared.Chemistry;
using Content.Shared.GameObjects.Components.Chemistry; using Content.Shared.GameObjects.Components.Chemistry;
using Content.Shared.Interfaces; using Content.Shared.Interfaces;
using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Interfaces.GameObjects.Components;
using Content.Shared.Utility;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
@@ -47,7 +48,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
async Task<bool> IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) async Task<bool> IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
if (!eventArgs.CanReach || eventArgs.Target == null) if (!eventArgs.InRangeUnobstructed() || eventArgs.Target == null)
return false; return false;
if (!Owner.TryGetComponent(out ISolutionInteractionsComponent? ownerSolution)) if (!Owner.TryGetComponent(out ISolutionInteractionsComponent? ownerSolution))