ECS and cleanup body system, merge body templates and presets into body prototypes (#11991)
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using Content.Server.Audio;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Recycling.Components;
|
||||
using Content.Shared.Audio;
|
||||
@@ -14,7 +14,6 @@ using Content.Shared.Recycling;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -25,6 +24,7 @@ namespace Content.Server.Recycling
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly AmbientSoundSystem _ambience = default!;
|
||||
[Dependency] private readonly BodySystem _bodySystem = default!;
|
||||
[Dependency] private readonly GameTicker _ticker = default!;
|
||||
[Dependency] private readonly PopupSystem _popup = default!;
|
||||
[Dependency] private readonly TagSystem _tags = default!;
|
||||
@@ -57,9 +57,9 @@ namespace Content.Server.Recycling
|
||||
victim,
|
||||
Filter.Pvs(victim, entityManager: EntityManager).RemoveWhereAttachedEntity(e => e == victim));
|
||||
|
||||
if (TryComp<SharedBodyComponent?>(victim, out var body))
|
||||
if (TryComp<BodyComponent?>(victim, out var body))
|
||||
{
|
||||
body.Gib(true);
|
||||
_bodySystem.GibBody(victim, true, body);
|
||||
}
|
||||
|
||||
Bloodstain(component);
|
||||
@@ -104,7 +104,7 @@ namespace Content.Server.Recycling
|
||||
// Mobs are a special case!
|
||||
if (CanGib(component, entity))
|
||||
{
|
||||
Comp<SharedBodyComponent>(entity).Gib(true);
|
||||
_bodySystem.GibBody(entity, true, Comp<BodyComponent>(entity));
|
||||
Bloodstain(component);
|
||||
return;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ namespace Content.Server.Recycling
|
||||
|
||||
private bool CanGib(RecyclerComponent component, EntityUid entity)
|
||||
{
|
||||
return HasComp<SharedBodyComponent>(entity) && !component.Safe &&
|
||||
return HasComp<BodyComponent>(entity) && !component.Safe &&
|
||||
this.IsPowered(component.Owner, EntityManager);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user