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

Revert "Allow Talking Across Atmosphere (#1089)" #1111

Merged
Merged
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
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
Loading