revenant can no longer harvest souls while in solid objects (#27612)

meow
This commit is contained in:
icekot8
2024-05-11 18:04:17 +03:00
committed by GitHub
parent a985c5e83e
commit 4e26be8617

View File

@@ -15,6 +15,7 @@ using Content.Shared.Bed.Sleep;
using System.Linq;
using System.Numerics;
using Content.Server.Revenant.Components;
using Content.Shared.Physics;
using Content.Shared.DoAfter;
using Content.Shared.Emag.Systems;
using Content.Shared.FixedPoint;
@@ -135,6 +136,12 @@ public sealed partial class RevenantSystem
return;
}
if(_physics.GetEntitiesIntersectingBody(uid, (int) CollisionGroup.Impassable).Count > 0)
{
_popup.PopupEntity(Loc.GetString("revenant-in-solid"), uid, uid);
return;
}
var doAfter = new DoAfterArgs(EntityManager, uid, revenant.HarvestDebuffs.X, new HarvestEvent(), uid, target: target)
{
DistanceThreshold = 2,