diff --git a/Content.Server/Chat/ChatComponent.cs b/Content.Server/Chat/ChatComponent.cs deleted file mode 100644 index e9e59f4de5c..00000000000 --- a/Content.Server/Chat/ChatComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Server.Chat; - -/// -/// Modifaer for entity to expand whisper radius -/// -[RegisterComponent] -public sealed partial class ChatComponent : Component -{ - [DataField("whisperPersonalRange")] - public int WhisperPersonalRange = 2; -} diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index 5c7f2590af6..908c4a7aabb 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -537,14 +537,12 @@ private void SendEntityWhisper( continue; listener = session.AttachedEntity.Value; - var listenerComp = CompOrNull(listener); //Corvax-Next-Resomi modifaer for whisper range - if (MessageRangeCheck(session, data, range) != MessageRangeCheckResult.Full) continue; // Won't get logged to chat, and ghosts are too far away to see the pop-up, so we just won't send it to them. - if ((listenerComp != null && data.Range <= listenerComp.WhisperPersonalRange) - || (listenerComp == null && data.Range <= WhisperClearRange)) //Corvax-Next-Resomi modifaer for whisper range + if (data.Range <= (TryComp(listener, out var modifier) ? modifier.WhisperListeningRange : WhisperClearRange)) //Corvax-Next-Resomi _chatManager.ChatMessageToOne(ChatChannel.Whisper, message, wrappedMessage, source, false, session.Channel); + //If listener is too far, they only hear fragments of the message else if (_examineSystem.InRangeUnOccluded(source, listener, WhisperMuffledRange)) _chatManager.ChatMessageToOne(ChatChannel.Whisper, obfuscatedMessage, wrappedobfuscatedMessage, source, false, session.Channel); diff --git a/Content.Shared/Chat/ChatModifierComponent.cs b/Content.Shared/Chat/ChatModifierComponent.cs new file mode 100644 index 00000000000..106f651c13c --- /dev/null +++ b/Content.Shared/Chat/ChatModifierComponent.cs @@ -0,0 +1,10 @@ +namespace Content.Shared.Chat; +/// +/// Corvax-Next-Resomi +/// +[RegisterComponent] +public sealed partial class ChatModifierComponent : Component +{ + [DataField("whisperListeningRange")] + public int WhisperListeningRange = SharedChatSystem.WhisperClearRange; +} diff --git a/Content.Shared/_CorvaxNext/Resomi/Abilities/SharedAgillitySkillSystem.cs b/Content.Shared/_CorvaxNext/Resomi/Abilities/SharedAgillitySkillSystem.cs index 5ae6b18e856..17686958f8a 100644 --- a/Content.Shared/_CorvaxNext/Resomi/Abilities/SharedAgillitySkillSystem.cs +++ b/Content.Shared/_CorvaxNext/Resomi/Abilities/SharedAgillitySkillSystem.cs @@ -29,9 +29,11 @@ public override void Initialize() private void DoJump(Entity ent, ref StartCollideEvent args) { - if (!ent.Comp.Active || !ent.Comp.JumpEnabled - || args.OurFixture.CollisionMask != BaseCollisionGroup - || args.OtherFixture.CollisionMask != (int)CollisionGroup.TableMask) //fix it.... maybe.... -_-.... or idk + if (!ent.Comp.Active || !ent.Comp.JumpEnabled) + return; + if (args.OurFixture.CollisionMask != BaseCollisionGroup) + return; + if (args.OtherFixture.CollisionMask != (int)CollisionGroup.TableMask) return; _stamina.TryTakeStamina(ent.Owner, ent.Comp.StaminaDamageOnJump); diff --git a/Content.Shared/_CorvaxNext/Resomi/Abilities/WeaponsUseInabilityComponent.cs b/Content.Shared/_CorvaxNext/Resomi/Abilities/WeaponsUseInabilityComponent.cs index 1555d1fc008..2a77a464f72 100644 --- a/Content.Shared/_CorvaxNext/Resomi/Abilities/WeaponsUseInabilityComponent.cs +++ b/Content.Shared/_CorvaxNext/Resomi/Abilities/WeaponsUseInabilityComponent.cs @@ -3,9 +3,7 @@ namespace Content.Shared._CorvaxNext.Resomi.Abilities; /// /// It does not allow you to fire a weapon that requires two hands. -/// increases the spread, as if shooting was conducted from one hand +/// Increases the spread, as if shooting was conducted from one hand. /// [RegisterComponent] -public sealed partial class WeaponsUseInabilityComponent : Component -{ -} +public sealed partial class WeaponsUseInabilityComponent : Component; diff --git a/Resources/Locale/ru-RU/species/species.ftl b/Resources/Locale/ru-RU/species/species.ftl index 874e5c4dc6c..e470ef2c7ba 100644 --- a/Resources/Locale/ru-RU/species/species.ftl +++ b/Resources/Locale/ru-RU/species/species.ftl @@ -10,5 +10,6 @@ species-name-moth = Ниан species-name-skeleton = Скелет species-name-vox = Вокс snail-hurt-by-salt-popup = Солевой раствор жжёт как кислота! -#CorvaxNext +# Corvax-Next-Resomi-Start species-name-resomi = Резоми +# Corvax-Next-Resomi-End diff --git a/Resources/Prototypes/_CorvaxNext/Entities/Species/resomi.yml b/Resources/Prototypes/_CorvaxNext/Entities/Species/resomi.yml index e6b0167905c..a6298b7a76d 100644 --- a/Resources/Prototypes/_CorvaxNext/Entities/Species/resomi.yml +++ b/Resources/Prototypes/_CorvaxNext/Entities/Species/resomi.yml @@ -7,8 +7,8 @@ components: - type: WeaponsUseInability - type: AgillitySkill - - type: Chat - whisperPersonalRange: 4 + - type: ChatModifier + whisperListeningRange: 4 - type: ResomiAccent - type: FootprintVisualizer - type: DamageVisuals