Skip to content

Commit

Permalink
Revert "Allow Talking Across Atmosphere (#1089)"
Browse files Browse the repository at this point in the history
This reverts commit 9ddd967.
  • Loading branch information
VMSolidus committed Oct 20, 2024
1 parent 5e575d8 commit 834890f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
using Content.Server.Shuttles.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Dynamics.Joints;
using Content.Shared.Atmos.Components;

namespace Content.Server.Chat.Systems;

Expand Down Expand Up @@ -507,8 +506,7 @@ private void SendEntityWhisper(
if (session.AttachedEntity is not { Valid: true } listener)
continue;

if (!HasComp<SharedMapAtmosphereComponent>(Transform(session.AttachedEntity.Value).MapUid)
&& Transform(session.AttachedEntity.Value).GridUid != Transform(source).GridUid
if (Transform(session.AttachedEntity.Value).GridUid != Transform(source).GridUid
&& !CheckAttachedGrids(source, session.AttachedEntity.Value))
continue;

Expand Down Expand Up @@ -714,10 +712,7 @@ private void SendInVoiceRange(ChatChannel channel, string name, string message,
var language = languageOverride ?? _language.GetLanguage(source);
foreach (var (session, data) in GetRecipients(source, Transform(source).GridUid == null ? 0.3f : VoiceRange))
{
if (session.AttachedEntity is not { Valid: true } playerEntity)
continue;

if (!HasComp<SharedMapAtmosphereComponent>(Transform(session.AttachedEntity.Value).MapUid)
if (session.AttachedEntity != null
&& Transform(session.AttachedEntity.Value).GridUid != Transform(source).GridUid
&& !CheckAttachedGrids(source, session.AttachedEntity.Value))
continue;
Expand All @@ -726,8 +721,11 @@ private void SendInVoiceRange(ChatChannel channel, string name, string message,
if (entRange == MessageRangeCheckResult.Disallowed)
continue;
var entHideChat = entRange == MessageRangeCheckResult.HideChat;
if (session.AttachedEntity is not { Valid: true } playerEntity)
continue;
EntityUid listener = session.AttachedEntity.Value;


// If the channel does not support languages, or the entity can understand the message, send the original message, otherwise send the obfuscated version
if (channel == ChatChannel.LOOC || channel == ChatChannel.Emotes || _language.CanUnderstand(listener, language.ID))
{
Expand Down

0 comments on commit 834890f

Please sign in to comment.