From 7faeefd9f007111a2df6dca37465a58400389748 Mon Sep 17 00:00:00 2001 From: Dmitry <57028746+DIMMoon1@users.noreply.github.com> Date: Mon, 23 Mar 2026 23:30:46 +0700 Subject: [PATCH] syntax update --- Content.Server/Chat/SuicideSystem.cs | 2 +- Content.Server/Telephone/TelephoneSystem.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/Chat/SuicideSystem.cs b/Content.Server/Chat/SuicideSystem.cs index e896fce125..b533a3f003 100644 --- a/Content.Server/Chat/SuicideSystem.cs +++ b/Content.Server/Chat/SuicideSystem.cs @@ -172,7 +172,7 @@ public sealed class SuicideSystem : EntitySystem // Corvax-IPC-start //args.DamageType ??= "Bloodloss"; string entityPrototypeId = ""; - if (EntityManager.TryGetComponent(victim, out var metaData) && metaData.EntityPrototype != null) + if (TryComp(victim, out MetaDataComponent? metaData) && metaData.EntityPrototype != null) entityPrototypeId = metaData.EntityPrototype.ID; if (entityPrototypeId != "MobIpc") diff --git a/Content.Server/Telephone/TelephoneSystem.cs b/Content.Server/Telephone/TelephoneSystem.cs index d5a5842d4c..0314a116b9 100644 --- a/Content.Server/Telephone/TelephoneSystem.cs +++ b/Content.Server/Telephone/TelephoneSystem.cs @@ -118,12 +118,12 @@ public sealed class TelephoneSystem : SharedTelephoneSystem // If speaker entity has TTS, the telephone will speak with the same voice if(TryComp(args.MessageSource, out var ttsSpeaker)) { - EntityManager.EnsureComponent(entity, out var ttsTelephone); + var ttsTelephone = EnsureComp(entity); ttsTelephone.VoicePrototypeId = ttsSpeaker.VoicePrototypeId; } else // Remove TTS if the speaker has no TTS { - EntityManager.RemoveComponent(entity); + RemComp(entity); } // Corvax-TTS-End _chat.TrySendInGameICMessage(speaker, args.Message, volume, range, nameOverride: name, checkRadioPrefix: false);