Make dead bodies disposable (#2375)
* Make dead bodies disposable * Formatting Fixes * Fixed Returning False in any case * Revert "Fixed Returning False in any case" This reverts commit fb1e40ca44f208078816e119976779280922b4c8. * Fixed Returning False in any case * Update Submodule
This commit is contained in:
@@ -6,12 +6,14 @@ using System.Threading;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.GUI;
|
using Content.Server.GameObjects.Components.GUI;
|
||||||
using Content.Server.GameObjects.Components.Items.Storage;
|
using Content.Server.GameObjects.Components.Items.Storage;
|
||||||
|
using Content.Server.GameObjects.Components.Mobs.State;
|
||||||
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
||||||
using Content.Server.GameObjects.Components.Projectiles;
|
using Content.Server.GameObjects.Components.Projectiles;
|
||||||
using Content.Server.GameObjects.EntitySystems.DoAfter;
|
using Content.Server.GameObjects.EntitySystems.DoAfter;
|
||||||
using Content.Server.Interfaces.GameObjects.Components.Items;
|
using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||||
using Content.Server.Utility;
|
using Content.Server.Utility;
|
||||||
using Content.Shared.GameObjects.Components.Body;
|
using Content.Shared.GameObjects.Components.Body;
|
||||||
|
using Content.Shared.GameObjects.Components.Damage;
|
||||||
using Content.Shared.GameObjects.Components.Disposal;
|
using Content.Shared.GameObjects.Components.Disposal;
|
||||||
using Content.Shared.GameObjects.Components.Items;
|
using Content.Shared.GameObjects.Components.Items;
|
||||||
using Content.Shared.GameObjects.EntitySystems;
|
using Content.Shared.GameObjects.EntitySystems;
|
||||||
@@ -136,11 +138,14 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!entity.TryGetComponent(out IPhysicsComponent? physics) ||
|
if (!entity.TryGetComponent(out IPhysicsComponent? physics) ||
|
||||||
!physics.CanCollide)
|
!physics.CanCollide)
|
||||||
{
|
{
|
||||||
|
if (!(entity.TryGetComponent(out IDamageableComponent? damageState) && damageState.CurrentState == DamageState.Dead)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!entity.HasComponent<ItemComponent>() &&
|
if (!entity.HasComponent<ItemComponent>() &&
|
||||||
!entity.HasComponent<IBody>())
|
!entity.HasComponent<IBody>())
|
||||||
|
|||||||
Reference in New Issue
Block a user