Cleanup speech and emoting comps (#13194)
Networks speech and removes the shared prefix from emoting. I have no idea if emoting is even being used or plan to be used in the interim.
This commit is contained in:
@@ -54,8 +54,8 @@ namespace Content.Server.Mind.Commands
|
||||
|
||||
if (allowSpeech)
|
||||
{
|
||||
entityManager.EnsureComponent<SharedSpeechComponent>(uid);
|
||||
entityManager.EnsureComponent<SharedEmotingComponent>(uid);
|
||||
entityManager.EnsureComponent<SpeechComponent>(uid);
|
||||
entityManager.EnsureComponent<EmotingComponent>(uid);
|
||||
}
|
||||
|
||||
entityManager.EnsureComponent<ExaminerComponent>(uid);
|
||||
|
||||
@@ -19,10 +19,10 @@ namespace Content.Server.Speech
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<SharedSpeechComponent, EntitySpokeEvent>(OnEntitySpoke);
|
||||
SubscribeLocalEvent<SpeechComponent, EntitySpokeEvent>(OnEntitySpoke);
|
||||
}
|
||||
|
||||
private void OnEntitySpoke(EntityUid uid, SharedSpeechComponent component, EntitySpokeEvent args)
|
||||
private void OnEntitySpoke(EntityUid uid, SpeechComponent component, EntitySpokeEvent args)
|
||||
{
|
||||
if (component.SpeechSounds == null) return;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public sealed class SurveillanceCameraSpeakerSystem : EntitySystem
|
||||
|
||||
// this part's mostly copied from speech
|
||||
if (time - component.LastSoundPlayed < cd
|
||||
&& TryComp<SharedSpeechComponent>(args.Speaker, out var speech)
|
||||
&& TryComp<SpeechComponent>(args.Speaker, out var speech)
|
||||
&& speech.SpeechSounds != null
|
||||
&& _prototypeManager.TryIndex(speech.SpeechSounds, out SpeechSoundsPrototype? speechProto))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user