Loudmode: Yapping Edition - #5395
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughChangesHeadset loud mode
The change adds a complete loud-mode flow from headset interaction to radio message formatting. The implementation includes the required component, prototype wiring, localization, and radio propagation. Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Speaker
participant HeadsetSystem
participant RadioSystem
participant MessageWrapper
Speaker->>HeadsetSystem: Speak through headset
HeadsetSystem->>RadioSystem: Send message with loud mode
RadioSystem->>MessageWrapper: Wrap standard or custom radio message
MessageWrapper-->>RadioSystem: Apply loud-mode font sizing
🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Content.Server/Radio/EntitySystems/HeadsetSystem.cs`:
- Line 75: Update the _radio.SendCustomRadioMessage call in HeadsetSystem to
pass loudMode as the named loudMode argument, ensuring it is not bound to
escapeMarkup and that user text remains correctly escaped while loud mode
activates.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 97333c7e-d4e5-4ed9-8616-c7bec833ecbe
📒 Files selected for processing (10)
Content.Server/Radio/EntitySystems/HeadsetSystem.csContent.Server/Radio/EntitySystems/RadioSystem.csContent.Shared/Radio/EntitySystems/SharedHeadsetSystem.csContent.Shared/_Starlight/Clothing/HeadsetLoudModeComponent.csResources/Locale/en-US/_Starlight/ui/verbs.ftlResources/Locale/en-US/headset/headset-component.ftlResources/Prototypes/Entities/Clothing/Ears/headsets.ymlResources/Prototypes/Entities/Clothing/Ears/headsets_alt.ymlResources/Prototypes/_Starlight/Entities/Clothing/Ears/headsets.ymlResources/Prototypes/_Starlight/Entities/Clothing/Ears/headsets_alt.yml
|
Note The previously reviewed commits are no longer reachable (likely due to a force-push or rebase), so CodeRabbit is performing a full review instead of an incremental one. This review may take a little longer. |
|
Does this work with all languages? There used to be a feature that bolded when someone yelled, but it was removed for lack of font support for language fonts. If just, scaling the font up works, I would LOVE a less-large version of this for any time anyone yells (using exclamation marks to end sentences) to revive that old feature a little. |
I haven't been able to test it for languages that aren't understood, but I know that if you understand them, it works just fine. If anything I can just make a TTF for the font that's the same as the original.
It's possible but out of scope |
redmushie
left a comment
There was a problem hiding this comment.
First off -- nice PR! I've missed yelling.
However, I have to give it to the other commenters. Re-introducing the "Scream!!" mechanic where (I believe two or more?) exclamation points turn something into yelling simply by increasing the font size is a lot more universal. It doesn't preclude non-Command players.
In addition, the yelling mechanic of old doesn't require new toggles, which is the biggest differentiator for me. It makes for a much simpler user experience.
As such I'm rejecting the PR in its current state. If you are willing to change to said approach I'd be more than happy to review it.
Perfectly willing. I'll add an increase of font size based off of how loud someone is. One exclamation for two font size increases, and two for four sizes increase. Or something along those lines. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Resources/Prototypes/Voice/speech_verbs.yml`:
- Line 38: Update the fontSize values for DefaultExclamation and
DefaultExclamationStrong so they explicitly use 14 and 16 respectively,
preserving the required two-point increase per exclamation level.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 99caf8a9-55a1-4ca7-876f-d751ce13a0bd
📒 Files selected for processing (3)
Content.Server/Radio/EntitySystems/RadioSystem.csResources/Locale/en-US/headset/headset-component.ftlResources/Prototypes/Voice/speech_verbs.yml
🚧 Files skipped from review as they are similar to previous changes (2)
- Resources/Locale/en-US/headset/headset-component.ftl
- Content.Server/Radio/EntitySystems/RadioSystem.cs
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Content.Server/Radio/EntitySystems/RadioSystem.cs (1)
480-488: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPreserve the language font baseline in both wrappers.
When
loudCompis present, both expressions useloudComp.FontSize + speech.FontSizeand discardlanguage.Speech.FontSize.
Content.Server/Radio/EntitySystems/RadioSystem.cs#L480-L488: resolve the normal or yelling base size first, then addloudComp.FontSize.Content.Server/Radio/EntitySystems/RadioSystem.cs#L522-L530: apply the same calculation to custom radio messages.Proposed fix
- return Loc.GetString(... ("fontSize", loudComp is not null ? loudComp.FontSize + speech.FontSize : isYelling ? speech.FontSize : language.Speech.FontSize ?? speech.FontSize), ...); + var fontSize = isYelling ? speech.FontSize : language.Speech.FontSize ?? speech.FontSize; + if (loudComp is not null) + fontSize += loudComp.FontSize; + + return Loc.GetString(... ("fontSize", fontSize), ...);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Content.Server/Radio/EntitySystems/RadioSystem.cs` around lines 480 - 488, The font-size calculation in both RadioSystem message wrappers must preserve the language baseline when loud mode is active. At Content.Server/Radio/EntitySystems/RadioSystem.cs lines 480-488, resolve the normal-or-yelling base size first, then add loudComp.FontSize; apply the same calculation at lines 522-530 for custom radio messages.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@Content.Server/Radio/EntitySystems/RadioSystem.cs`:
- Around line 480-488: The font-size calculation in both RadioSystem message
wrappers must preserve the language baseline when loud mode is active. At
Content.Server/Radio/EntitySystems/RadioSystem.cs lines 480-488, resolve the
normal-or-yelling base size first, then add loudComp.FontSize; apply the same
calculation at lines 522-530 for custom radio messages.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 68d60eb8-ccac-491b-a575-9cd880cae51a
📒 Files selected for processing (5)
Content.Server/Radio/EntitySystems/HeadsetSystem.csContent.Server/Radio/EntitySystems/RadioSystem.csContent.Shared/_Starlight/Clothing/HeadsetLoudModeComponent.csResources/Locale/en-US/headset/headset-component.ftlResources/Prototypes/Voice/speech_verbs.yml
💤 Files with no reviewable changes (1)
- Resources/Locale/en-US/headset/headset-component.ftl
🚧 Files skipped from review as they are similar to previous changes (3)
- Resources/Prototypes/Voice/speech_verbs.yml
- Content.Server/Radio/EntitySystems/HeadsetSystem.cs
- Content.Shared/_Starlight/Clothing/HeadsetLoudModeComponent.cs
92bc6f6


Short description
Adds loudmode to command headsets and some outlier commanding headsets.
Accessible by right click the headset.
Why we need to add this
During cluttered and hectic moments, the boldened text will make it easier to read.
Media (Video/Screenshots)
Headsets with loud mode:

UI Verb:

Inactive:

Active:

Loudmode active, common (with chat width @ 350):

In active:

Yelling / Screaming:

Checks
Changelog
🆑 Spaghetti-Bit