diff --git a/Content.Shared/ADT/Language/Components/UniversalLanguageSpeakerComponent.cs b/Content.Shared/ADT/Language/Components/UniversalLanguageSpeakerComponent.cs new file mode 100644 index 00000000000..e66ccf293c5 --- /dev/null +++ b/Content.Shared/ADT/Language/Components/UniversalLanguageSpeakerComponent.cs @@ -0,0 +1,12 @@ +using Robust.Shared.Prototypes; +using Robust.Shared.GameStates; + +namespace Content.Shared.ADT.Language; + +/// +/// This component allows entity to speak and understand languages. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class UniversalLanguageSpeakerComponent : Component +{ +} diff --git a/Content.Shared/ADT/Language/Systems/SharedLanguageSystem.cs b/Content.Shared/ADT/Language/Systems/SharedLanguageSystem.cs index 7e5748008d2..617ec4c879f 100644 --- a/Content.Shared/ADT/Language/Systems/SharedLanguageSystem.cs +++ b/Content.Shared/ADT/Language/Systems/SharedLanguageSystem.cs @@ -21,7 +21,7 @@ public abstract class SharedLanguageSystem : EntitySystem public override void Initialize() { - + } public bool CanSpeak(EntityUid uid, LanguagePrototype proto, LanguageSpeakerComponent? component = null) @@ -29,6 +29,9 @@ public bool CanSpeak(EntityUid uid, LanguagePrototype proto, LanguageSpeakerComp if (HasComp(uid)) return false; + if (HasComp(uid)) + return true; + if (!Resolve(uid, ref component)) return false; @@ -50,6 +53,9 @@ public bool CanUnderstand(EntityUid uid, LanguagePrototype proto, LanguageSpeake if (HasComp(uid)) return true; + if (HasComp(uid)) + return true; + if (!Resolve(uid, ref component)) return false; diff --git a/Resources/Prototypes/ADT/Entities/Mobs/Player/phantom.yml b/Resources/Prototypes/ADT/Entities/Mobs/Player/phantom.yml index 29e3e046f7c..213bc3e5cb3 100644 --- a/Resources/Prototypes/ADT/Entities/Mobs/Player/phantom.yml +++ b/Resources/Prototypes/ADT/Entities/Mobs/Player/phantom.yml @@ -75,6 +75,7 @@ - Universal - type: TypingIndicator proto: alien + - type: UniversalLanguageSpeaker - type: entity id: ADTPhantomReincarnationAnim diff --git a/Resources/Prototypes/ADT/Entities/Mobs/Player/poltergeist.yml b/Resources/Prototypes/ADT/Entities/Mobs/Player/poltergeist.yml index 28bf1d29033..5a21812fdd3 100644 --- a/Resources/Prototypes/ADT/Entities/Mobs/Player/poltergeist.yml +++ b/Resources/Prototypes/ADT/Entities/Mobs/Player/poltergeist.yml @@ -31,7 +31,7 @@ mask: - GhostImpassable - type: MovementIgnoreGravity - gravityState: true + gravityState: true - type: Damageable damageContainer: Biological - type: Examiner @@ -60,3 +60,4 @@ - GalacticCommon - type: Jetpack # да, костыль. - type: OuijaBoardUser + - type: UniversalLanguageSpeaker