Make gibbing drop items again (#21047)
LGTM, Just a warning that this will probably get overriden when medical refactor gets merged since it refactors gibbing.
This commit is contained in:
@@ -111,7 +111,7 @@ public sealed class BodySystem : SharedBodySystem
|
||||
_humanoidSystem.SetLayersVisibility(bodyUid, layers, false, true, humanoid);
|
||||
}
|
||||
|
||||
public override HashSet<EntityUid> GibBody(EntityUid bodyId, bool gibOrgans = false, BodyComponent? body = null, bool deleteItems = false)
|
||||
public override HashSet<EntityUid> GibBody(EntityUid bodyId, bool gibOrgans = false, BodyComponent? body = null, bool deleteItems = false, bool deleteBrain = false)
|
||||
{
|
||||
if (!Resolve(bodyId, ref body, false))
|
||||
return new HashSet<EntityUid>();
|
||||
@@ -123,7 +123,7 @@ public sealed class BodySystem : SharedBodySystem
|
||||
if (xform.MapUid == null)
|
||||
return new HashSet<EntityUid>();
|
||||
|
||||
var gibs = base.GibBody(bodyId, gibOrgans, body, deleteItems);
|
||||
var gibs = base.GibBody(bodyId, gibOrgans, body, deleteItems, deleteBrain);
|
||||
|
||||
var coordinates = xform.Coordinates;
|
||||
var filter = Filter.Pvs(bodyId, entityManager: EntityManager);
|
||||
@@ -135,7 +135,10 @@ public sealed class BodySystem : SharedBodySystem
|
||||
{
|
||||
if (deleteItems)
|
||||
{
|
||||
QueueDel(entity);
|
||||
if (!HasComp<BrainComponent>(entity) || deleteBrain)
|
||||
{
|
||||
QueueDel(entity);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user