Fix meat spike vaporizing victim items (#13697)
This commit is contained in:
@@ -17,6 +17,8 @@ using Content.Shared.Kitchen;
|
|||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Mobs.Systems;
|
using Content.Shared.Mobs.Systems;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
|
using Robust.Server.GameObjects;
|
||||||
|
using Content.Server.Body.Systems;
|
||||||
|
|
||||||
namespace Content.Server.Kitchen.EntitySystems
|
namespace Content.Server.Kitchen.EntitySystems
|
||||||
{
|
{
|
||||||
@@ -27,6 +29,8 @@ namespace Content.Server.Kitchen.EntitySystems
|
|||||||
[Dependency] private readonly IAdminLogManager _logger = default!;
|
[Dependency] private readonly IAdminLogManager _logger = default!;
|
||||||
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
|
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
[Dependency] private readonly TransformSystem _transform = default!;
|
||||||
|
[Dependency] private readonly BodySystem _bodySystem = default!;
|
||||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||||
|
|
||||||
@@ -133,9 +137,13 @@ namespace Content.Server.Kitchen.EntitySystems
|
|||||||
|
|
||||||
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", Identity.Entity(userUid, EntityManager)), ("victim", victimUid)), uid, PopupType.LargeCaution);
|
_popupSystem.PopupEntity(Loc.GetString("comp-kitchen-spike-kill", ("user", Identity.Entity(userUid, EntityManager)), ("victim", victimUid)), uid, PopupType.LargeCaution);
|
||||||
|
|
||||||
|
_transform.SetCoordinates(victimUid, Transform(uid).Coordinates);
|
||||||
// THE WHAT?
|
// THE WHAT?
|
||||||
// TODO: Need to be able to leave them on the spike to do DoT, see ss13.
|
// TODO: Need to be able to leave them on the spike to do DoT, see ss13.
|
||||||
EntityManager.QueueDeleteEntity(victimUid);
|
var gibs = _bodySystem.GibBody(victimUid);
|
||||||
|
foreach (var gib in gibs) {
|
||||||
|
QueueDel(gib);
|
||||||
|
}
|
||||||
|
|
||||||
_audio.Play(component.SpikeSound, Filter.Pvs(uid), uid, true);
|
_audio.Play(component.SpikeSound, Filter.Pvs(uid), uid, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user