From 637cfe4be8da626fc0c5e2d91042b6a7e6c65857 Mon Sep 17 00:00:00 2001 From: Red <96445749+TheShuEd@users.noreply.github.com> Date: Tue, 17 Jun 2025 01:19:09 +0300 Subject: [PATCH] nerf gods (#1436) --- .../_CP14/Religion/CP14ReligionSystem.cs | 23 ++++++++++++++++++- .../Textures/_CP14/Shaders/religion.swsl | 4 ++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Content.Server/_CP14/Religion/CP14ReligionSystem.cs b/Content.Server/_CP14/Religion/CP14ReligionSystem.cs index 991f620cbd..ac9cdd5eaa 100644 --- a/Content.Server/_CP14/Religion/CP14ReligionSystem.cs +++ b/Content.Server/_CP14/Religion/CP14ReligionSystem.cs @@ -25,6 +25,8 @@ public sealed partial class CP14ReligionGodSystem : CP14SharedReligionGodSystem [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; + private EntityQuery _godQuery; + /// /// If ReligionObserver receives a radius higher than this value, this entity will automatically be placed in PvsOverride for the god in order to function correctly outside of the player's PVS. /// @@ -36,6 +38,8 @@ public sealed partial class CP14ReligionGodSystem : CP14SharedReligionGodSystem base.Initialize(); InitializeUI(); + _godQuery = GetEntityQuery(); + SubscribeLocalEvent(OnObserverInit); SubscribeLocalEvent(OnObserverHandleState); @@ -44,10 +48,27 @@ public sealed partial class CP14ReligionGodSystem : CP14SharedReligionGodSystem SubscribeLocalEvent(OnPlayerAttached); SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(OnSpokeAttempt); + SubscribeLocalEvent(OnExpandRecipients); SubscribeLocalEvent(OnListen); } + private void OnExpandRecipients(ExpandICChatRecipientsEvent ev) + { + foreach (var recipient in ev.Recipients) + { + var recipientEntity = recipient.Key.AttachedEntity; + if (!_godQuery.TryComp(recipientEntity, out var god) || god.Religion is null) + continue; + + if (!InVision(ev.Source, (recipientEntity.Value, god))) + { + // If the recipient is not in vision, we don't want to send them the message. + ev.Recipients.Remove(recipient.Key); + } + } + } + public override void Update(float frameTime) { base.Update(frameTime); @@ -74,7 +95,7 @@ public sealed partial class CP14ReligionGodSystem : CP14SharedReligionGodSystem { args.Cancel(); - if (!TryComp(ent, out var god) || god.Religion is null) + if (!_godQuery.TryComp(ent, out var god) || god.Religion is null) return; if (ent.Comp.RestrictedReligionZone && !InVision(ent, (ent, god))) diff --git a/Resources/Textures/_CP14/Shaders/religion.swsl b/Resources/Textures/_CP14/Shaders/religion.swsl index d3deb8a7de..0168f11ba7 100644 --- a/Resources/Textures/_CP14/Shaders/religion.swsl +++ b/Resources/Textures/_CP14/Shaders/religion.swsl @@ -27,7 +27,7 @@ highp float noise( highp vec2 p ) { highp vec3 gradientColor(highp float t) { if (t < 0.5) { highp float f = t / 0.5; - return mix(vec3(0.0), shaderColor * vec3(0.05, 0.05, 0.15), f); + return mix(shaderColor * vec3(0.00, 0.00, 0.05), shaderColor * vec3(0.05, 0.05, 0.15), f); } else { highp float f = (t - 0.5) / 0.5; return mix(shaderColor * vec3(0.05, 0.05, 0.15), shaderColor * vec3(0.15, 0.15, 0.25), f); @@ -77,7 +77,7 @@ void fragment() { edgeHighlight * step(0.5, 1.0 - visibility) ); - highp float minAlpha = 0.8; + highp float minAlpha = 1; COLOR = vec4(finalColor, mix(minAlpha, 1.0, visibility)); }