Speech and Emoting components (#3075)

* Add Speech and Emoting components.

* makesentient gives you speech and emoting abilities.

* Ghosts do *not* need a SpeechComponent.

* I hate you all, and I hate shared code as well.
This commit is contained in:
Vera Aguilera Puerto
2021-02-05 17:01:54 +01:00
committed by GitHub
parent b62cc84e8c
commit 63e1252539
7 changed files with 92 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.GameObjects.EntitySystems.EffectBlocker;
using Content.Shared.GameObjects.Components.Mobs.Speech;
using Content.Shared.GameObjects.EntitySystems.EffectBlocker;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
@@ -62,6 +63,9 @@ namespace Content.Shared.GameObjects.EntitySystems.ActionBlocker
public static bool CanSpeak(IEntity entity)
{
if (!entity.HasComponent<SharedSpeechComponent>())
return false;
var canSpeak = true;
foreach (var blocker in entity.GetAllComponents<IActionBlocker>())
@@ -98,6 +102,9 @@ namespace Content.Shared.GameObjects.EntitySystems.ActionBlocker
public static bool CanEmote(IEntity entity)
{
if (!entity.HasComponent<SharedEmotingComponent>())
return false;
var canEmote = true;
foreach (var blocker in entity.GetAllComponents<IActionBlocker>())