Death acidifier fix (#25251)
This commit is contained in:
@@ -111,7 +111,6 @@ public sealed class BodySystem : SharedBodySystem
|
|||||||
EntityUid bodyId,
|
EntityUid bodyId,
|
||||||
bool gibOrgans = false,
|
bool gibOrgans = false,
|
||||||
BodyComponent? body = null ,
|
BodyComponent? body = null ,
|
||||||
bool deleteItems = false,
|
|
||||||
bool launchGibs = true,
|
bool launchGibs = true,
|
||||||
Vector2? splatDirection = null,
|
Vector2? splatDirection = null,
|
||||||
float splatModifier = 1,
|
float splatModifier = 1,
|
||||||
@@ -129,7 +128,7 @@ public sealed class BodySystem : SharedBodySystem
|
|||||||
if (xform.MapUid == null)
|
if (xform.MapUid == null)
|
||||||
return new HashSet<EntityUid>();
|
return new HashSet<EntityUid>();
|
||||||
|
|
||||||
var gibs = base.GibBody(bodyId, gibOrgans, body, deleteItems, launchGibs: launchGibs,
|
var gibs = base.GibBody(bodyId, gibOrgans, body, launchGibs: launchGibs,
|
||||||
splatDirection: splatDirection, splatModifier: splatModifier, splatCone:splatCone);
|
splatDirection: splatDirection, splatModifier: splatModifier, splatCone:splatCone);
|
||||||
RaiseLocalEvent(bodyId, new BeingGibbedEvent(gibs));
|
RaiseLocalEvent(bodyId, new BeingGibbedEvent(gibs));
|
||||||
QueueDel(bodyId);
|
QueueDel(bodyId);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using Content.Shared.Explosion.Components;
|
|||||||
using Content.Shared.Explosion.Components.OnTrigger;
|
using Content.Shared.Explosion.Components.OnTrigger;
|
||||||
using Content.Shared.Implants.Components;
|
using Content.Shared.Implants.Components;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
|
using Content.Shared.Inventory;
|
||||||
using Content.Shared.Mobs;
|
using Content.Shared.Mobs;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Payload.Components;
|
using Content.Shared.Payload.Components;
|
||||||
@@ -68,6 +69,7 @@ namespace Content.Server.Explosion.EntitySystems
|
|||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||||
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
||||||
|
[Dependency] private readonly InventorySystem _inventory = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -154,9 +156,15 @@ namespace Content.Server.Explosion.EntitySystems
|
|||||||
{
|
{
|
||||||
if (!TryComp<TransformComponent>(uid, out var xform))
|
if (!TryComp<TransformComponent>(uid, out var xform))
|
||||||
return;
|
return;
|
||||||
|
if (component.DeleteItems)
|
||||||
_body.GibBody(xform.ParentUid, true, deleteItems: component.DeleteItems);
|
{
|
||||||
|
var items = _inventory.GetHandOrInventoryEntities(xform.ParentUid);
|
||||||
|
foreach (var item in items)
|
||||||
|
{
|
||||||
|
Del(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_body.GibBody(xform.ParentUid, true);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -274,8 +274,7 @@ public partial class SharedBodySystem
|
|||||||
public virtual HashSet<EntityUid> GibBody(
|
public virtual HashSet<EntityUid> GibBody(
|
||||||
EntityUid bodyId,
|
EntityUid bodyId,
|
||||||
bool gibOrgans = false,
|
bool gibOrgans = false,
|
||||||
BodyComponent? body = null ,
|
BodyComponent? body = null,
|
||||||
bool deleteItems = false,
|
|
||||||
bool launchGibs = true,
|
bool launchGibs = true,
|
||||||
Vector2? splatDirection = null,
|
Vector2? splatDirection = null,
|
||||||
float splatModifier = 1,
|
float splatModifier = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user