Add interaction checks to all interactions (#923)

This commit is contained in:
chairbender
2020-05-23 02:27:31 -07:00
committed by GitHub
parent af0ec2aeb9
commit 6a4d78cfac
63 changed files with 311 additions and 101 deletions

View File

@@ -2,6 +2,7 @@ using System;
using Content.Server.GameObjects.Components.Chemistry;
using Content.Server.GameObjects.Components.Sound;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Utility;
using Content.Shared.Chemistry;
using Content.Shared.Interfaces;
using Robust.Shared.GameObjects;

View File

@@ -2,6 +2,7 @@ using System;
using Content.Server.GameObjects.Components.Chemistry;
using Content.Server.GameObjects.Components.Sound;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Utility;
using Content.Shared.Chemistry;
using Content.Shared.Interfaces;
using Robust.Shared.GameObjects;
@@ -59,6 +60,8 @@ namespace Content.Server.GameObjects.Components.Fluids
void IAfterAttack.AfterAttack(AfterAttackEventArgs eventArgs)
{
if (!InteractionChecks.InRangeUnobstructed(eventArgs)) return;
Solution solution;
if (eventArgs.Attacked == null)
{

View File

@@ -9,6 +9,7 @@ using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random;
using Robust.Shared.IoC;
@@ -17,6 +18,7 @@ using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
using Timer = Robust.Shared.Timers.Timer;
using Robust.Shared.Utility;
namespace Content.Server.GameObjects.Components.Fluids
{
@@ -137,8 +139,7 @@ namespace Content.Server.GameObjects.Components.Fluids
return true;
}
var entitySystemManager = IoCManager.Resolve<IEntitySystemManager>();
entitySystemManager.GetEntitySystem<AudioSystem>().Play(_spillSound);
EntitySystem.Get<AudioSystem>().Play(_spillSound);
return true;
}