Skip to content

Commit

Permalink
Reaper buckle fix (SerbiaStrong-220#1320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnomeev authored Jul 9, 2024
1 parent 9156a27 commit 7545bfe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Content.Server/SS220/DarkReaper/DarkReaperSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
using System.Numerics;
using Content.Server.Actions;
using Content.Server.AlertLevel;
using Content.Server.Buckle.Systems;
using Content.Server.Chat.Systems;
using Content.Server.Ghost;
using Content.Server.Light.Components;
using Content.Server.Light.EntitySystems;
using Content.Server.Station.Systems;
using Content.Shared.Alert;
using Content.Shared.Buckle.Components;
using Content.Shared.Damage;
using Content.Shared.Inventory;
using Content.Shared.Mobs.Systems;
Expand Down Expand Up @@ -36,6 +38,7 @@ public sealed class DarkReaperSystem : SharedDarkReaperSystem
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly BuckleSystem _buckle = default!;

private readonly ISawmill _sawmill = Logger.GetSawmill("DarkReaper");

Expand Down Expand Up @@ -89,6 +92,11 @@ protected override void OnAfterConsumed(EntityUid uid, DarkReaperComponent comp,
if (!_container.CanInsert(target, container))
return;

if (_buckle.IsBuckled(args.Target.Value))
{
_buckle.TryUnbuckle(args.Target.Value, args.Target.Value, true);
}

// spawn gore
Spawn(comp.EntityToSpawnAfterConsuming, Transform(target).Coordinates);

Expand Down

0 comments on commit 7545bfe

Please sign in to comment.