mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
syntax update
This commit is contained in:
parent
77243d4678
commit
7faeefd9f0
2 changed files with 3 additions and 3 deletions
|
|
@ -172,7 +172,7 @@ public sealed class SuicideSystem : EntitySystem
|
|||
// Corvax-IPC-start
|
||||
//args.DamageType ??= "Bloodloss";
|
||||
string entityPrototypeId = "";
|
||||
if (EntityManager.TryGetComponent<MetaDataComponent>(victim, out var metaData) && metaData.EntityPrototype != null)
|
||||
if (TryComp(victim, out MetaDataComponent? metaData) && metaData.EntityPrototype != null)
|
||||
entityPrototypeId = metaData.EntityPrototype.ID;
|
||||
|
||||
if (entityPrototypeId != "MobIpc")
|
||||
|
|
|
|||
|
|
@ -118,12 +118,12 @@ public sealed class TelephoneSystem : SharedTelephoneSystem
|
|||
// If speaker entity has TTS, the telephone will speak with the same voice
|
||||
if(TryComp<TTSComponent>(args.MessageSource, out var ttsSpeaker))
|
||||
{
|
||||
EntityManager.EnsureComponent<TTSComponent>(entity, out var ttsTelephone);
|
||||
var ttsTelephone = EnsureComp<TTSComponent>(entity);
|
||||
ttsTelephone.VoicePrototypeId = ttsSpeaker.VoicePrototypeId;
|
||||
}
|
||||
else // Remove TTS if the speaker has no TTS
|
||||
{
|
||||
EntityManager.RemoveComponent<TTSComponent>(entity);
|
||||
RemComp<TTSComponent>(entity);
|
||||
}
|
||||
// Corvax-TTS-End
|
||||
_chat.TrySendInGameICMessage(speaker, args.Message, volume, range, nameOverride: name, checkRadioPrefix: false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue