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

Add hushed trait #2106

Merged
merged 9 commits into from
Nov 6, 2024
Merged

Add hushed trait #2106

merged 9 commits into from
Nov 6, 2024

Conversation

ewokswagger
Copy link
Contributor

@ewokswagger ewokswagger commented Nov 4, 2024

About the PR

Added new Hushed trait. A 0 cost speech trait which gives a HushedComponent that causes local messages to be converted to whispers.

Why / Balance

Several players have characters that are soft-spoken or shy and this gives another option to express that. This trait can help consistency in character by avoiding accidental local chats from players who take this trait.

Technical details

Added Hushed trait and component. Added logic in TrySendInGameICMessage to check if someone has the HushedComponenet and intends to send in local, and changes it to a whisper. Applied after checking and removing local prefix.

Media

2024-11-03.18-58-52.mp4

Requirements

Breaking changes

None

Changelog
🆑 SolStar2, Vivi Bunny

  • add: Added Hushed trait. Hushed players will whisper instead of talking.

@ewokswagger ewokswagger requested review from a team as code owners November 4, 2024 00:15
@github-actions github-actions bot added Changes: YML Changes any yml files Changes: C# Changes any cs files Changes: Localization Changes any ftl files Status: Needs Review labels Nov 4, 2024
@ewokswagger ewokswagger changed the title Hushed Add Hushed Trait Nov 4, 2024
@ewokswagger ewokswagger changed the title Add Hushed Trait Add hushed trait Nov 4, 2024
Content.Server/Chat/Systems/ChatSystem.cs Show resolved Hide resolved
Content.Server/Chat/Systems/ChatSystem.cs Outdated Show resolved Hide resolved
Resources/Locale/en-US/traits/traits.ftl Outdated Show resolved Hide resolved
Content.Shared/Speech/Muting/HushedComponent.cs Outdated Show resolved Hide resolved
Resources/Prototypes/Traits/speech.yml Outdated Show resolved Hide resolved
@MilonPL MilonPL added Status: Awaiting Changes Do not merge due to requested changes and removed Status: Needs Review labels Nov 4, 2024
@ewokswagger
Copy link
Contributor Author

All changes should be resolved now.

Content.Server/Chat/Systems/ChatSystem.cs Outdated Show resolved Hide resolved
Content.Server/Chat/Systems/ChatSystem.cs Outdated Show resolved Hide resolved
MilonPL
MilonPL previously approved these changes Nov 4, 2024
@MilonPL MilonPL enabled auto-merge (squash) November 4, 2024 04:58
@ewokswagger
Copy link
Contributor Author

ewokswagger commented Nov 4, 2024

I think the fails are fake? Since it worked since I just added the spaces and re-added a couple usings.

Content.Shared/DeltaV/Speech/HushedComponent.cs Outdated Show resolved Hide resolved
Content.Shared/DeltaV/Speech/HushedComponent.cs Outdated Show resolved Hide resolved
Resources/Prototypes/DeltaV/Traits/speech.yml Outdated Show resolved Hide resolved
auto-merge was automatically disabled November 4, 2024 17:30

Head branch was pushed to by a user without write access

@Unkn0wnGh0st333
Copy link
Contributor

I can already seeing people stacking this with stuttering on their little nerds heh
W PR

@FieldCommand
Copy link

I can already seeing people stacking this with stuttering on their little nerds heh W PR

I have a character in mind for this already, though I would like to see a more severe version of stuttering, as the one we have is very mild, to the point I wouldn't really call it stutter.

@ewokswagger
Copy link
Contributor Author

I can already seeing people stacking this with stuttering on their little nerds heh W PR

I have a character in mind for this already, though I would like to see a more severe version of stuttering, as the one we have is very mild, to the point I wouldn't really call it stutter.

This could be remedied fairly easily by changing the values here.

namespace Content.Server.Speech.Components
{
[RegisterComponent]
public sealed partial class StutteringAccentComponent : Component
{
/// <summary>
/// Percentage chance that a stutter will occur if it matches.
/// </summary>
[DataField("matchRandomProb")]
[ViewVariables(VVAccess.ReadWrite)]
public float MatchRandomProb = 0.8f;
/// <summary>
/// Percentage chance that a stutter occurs f-f-f-f-four times.
/// </summary>
[DataField("fourRandomProb")]
[ViewVariables(VVAccess.ReadWrite)]
public float FourRandomProb = 0.1f;
/// <summary>
/// Percentage chance that a stutter occurs t-t-t-three times.
/// </summary>
[DataField("threeRandomProb")]
[ViewVariables(VVAccess.ReadWrite)]
public float ThreeRandomProb = 0.2f;
/// <summary>
/// Percentage chance that a stutter cut off.
/// </summary>
[DataField("cutRandomProb")]
[ViewVariables(VVAccess.ReadWrite)]
public float CutRandomProb = 0.05f;
}
}

@github-actions github-actions bot added Status: Needs Review and removed Status: Awaiting Changes Do not merge due to requested changes labels Nov 4, 2024
@ewokswagger
Copy link
Contributor Author

@deltanedas Is there anything else I need to do?

@deltanedas deltanedas merged commit e06d593 into DeltaV-Station:master Nov 6, 2024
11 checks passed
@ewokswagger ewokswagger deleted the hushed branch November 6, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants