Skip to content

Commit

Permalink
Пиздец какой фикс (#274)
Browse files Browse the repository at this point in the history
Исправил незнание языков фантомом 

-->

:cl:
- fix: Фикс языков фантома
  • Loading branch information
FaDeOkno authored Aug 15, 2024
1 parent e404457 commit 4f95ffc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
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

0 comments on commit 4f95ffc

Please sign in to comment.