From 855b25aeb7f29ed6ff2dcc0d4ab1e589ae7e2e16 Mon Sep 17 00:00:00 2001 From: TGRCDev Date: Sun, 15 Sep 2024 14:14:28 -0700 Subject: [PATCH] Revenant plushies and ectoplasm now talk with their trapped revenant's name --- .../Revenant/EntitySystems/RevenantStasisSystem.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Content.Server/Revenant/EntitySystems/RevenantStasisSystem.cs b/Content.Server/Revenant/EntitySystems/RevenantStasisSystem.cs index db229667a5b3..38bb5b3e830b 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantStasisSystem.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantStasisSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Ghost.Roles.Components; using Content.Server.Mind; using Content.Server.Revenant.Components; +using Content.Server.VoiceMask; using Content.Shared.Alert; using Content.Shared.DoAfter; using Content.Shared.Examine; @@ -43,7 +44,6 @@ public override void Initialize() SubscribeLocalEvent(OnExamine); SubscribeLocalEvent(OnCrafted); - // TODO: This code should be in a shared system SubscribeLocalEvent(OnBibleInteract, before: [typeof(BibleSystem)]); SubscribeLocalEvent(OnExorcise); } @@ -63,6 +63,9 @@ private void OnStartup(EntityUid uid, RevenantStasisComponent component, Compone speech.SpeechVerb = "Ghost"; Dirty(uid, speech); + var voice = EnsureComp(uid); + voice.VoiceName = Comp(component.Revenant).EntityName; + if (TryComp(uid, out var ghostRole)) _ghostRoles.UnregisterGhostRole((uid, ghostRole)); } @@ -103,9 +106,10 @@ private void OnCrafted(EntityUid uid, RevenantStasisComponent comp, Construction speech.SpeechVerb = "Ghost"; Dirty(args.New, speech); - var mover = EnsureComp(uid); - mover.CanMove = false; - Dirty(uid, mover); + EnsureComp(args.New); + + var voice = EnsureComp(args.New); + voice.VoiceName = Comp(comp.Revenant).EntityName; if (_mind.TryGetMind(uid, out var mindId, out var _)) _mind.TransferTo(mindId, args.New);