Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Пиздец какой фикс #274

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;

namespace Content.Shared.ADT.Language;

/// <summary>
/// This component allows entity to speak and understand languages.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class UniversalLanguageSpeakerComponent : Component
{
}
8 changes: 7 additions & 1 deletion Content.Shared/ADT/Language/Systems/SharedLanguageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ public abstract class SharedLanguageSystem : EntitySystem

public override void Initialize()
{

}

public bool CanSpeak(EntityUid uid, LanguagePrototype proto, LanguageSpeakerComponent? component = null)
{
if (HasComp<GhostComponent>(uid))
return false;

if (HasComp<UniversalLanguageSpeakerComponent>(uid))
return true;

if (!Resolve(uid, ref component))
return false;

Expand All @@ -50,6 +53,9 @@ public bool CanUnderstand(EntityUid uid, LanguagePrototype proto, LanguageSpeake
if (HasComp<GhostComponent>(uid))
return true;

if (HasComp<UniversalLanguageSpeakerComponent>(uid))
return true;

if (!Resolve(uid, ref component))
return false;

Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/ADT/Entities/Mobs/Player/phantom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
- Universal
- type: TypingIndicator
proto: alien
- type: UniversalLanguageSpeaker

- type: entity
id: ADTPhantomReincarnationAnim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
mask:
- GhostImpassable
- type: MovementIgnoreGravity
gravityState: true
gravityState: true
- type: Damageable
damageContainer: Biological
- type: Examiner
Expand Down Expand Up @@ -60,3 +60,4 @@
- GalacticCommon
- type: Jetpack # да, костыль.
- type: OuijaBoardUser
- type: UniversalLanguageSpeaker
Loading