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,3 +1,4 @@
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.Buckle.Components;
|
||||
using Content.Server.Buckle.Systems;
|
||||
using Content.Server.Popups;
|
||||
@@ -24,6 +25,7 @@ namespace Content.Server.Toilet
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly BodySystem _bodySystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly SecretStashSystem _secretStash = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
@@ -48,8 +50,8 @@ namespace Content.Server.Toilet
|
||||
return;
|
||||
|
||||
// Check that victim has a head
|
||||
if (EntityManager.TryGetComponent<SharedBodyComponent>(args.Victim, out var body) &&
|
||||
body.HasPartOfType(BodyPartType.Head))
|
||||
if (EntityManager.TryGetComponent<BodyComponent>(args.Victim, out var body) &&
|
||||
_bodySystem.BodyHasChildOfType(args.Victim, BodyPartType.Head, body))
|
||||
{
|
||||
var othersMessage = Loc.GetString("toilet-component-suicide-head-message-others",
|
||||
("victim", Identity.Entity(args.Victim, EntityManager)), ("owner", uid));
|
||||
|
||||
Reference in New Issue
Block a user