Radio Emotes + Possessive Emotes - #463
Conversation
* Changed up how emoting works This was a long 10 hours just to get the chat to behave slightly different. At least we can now scream over radio! Will most definitely need some more work to get bugs out since this is the first implementation. * Not ok This was unmarked for some reason... I don't remember unmarking this. * DeltaV comments Added comments to explain changes. Moved localization files to the _DV folder. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Moved code Moved code to more suitable files and added some comments. * Rights for robots Now those with intrinsic radios can also emote! * Fixes up some small stuff Changes to fix some small issues with the code to align it more with modern standards. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix by-ref event Never worked with this event type before so gonna hope this works. * Update Content.Shared/Chat/SharedChatSystem.Emote.cs Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> * Update Content.Shared/Chat/SharedChatSystem.cs Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> * Update Content.Server/Chat/Systems/ChatSystem.cs Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> * fix style nits * remove conflicting chatsan --------- Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
* Changed up how emoting works This was a long 10 hours just to get the chat to behave slightly different. At least we can now scream over radio! Will most definitely need some more work to get bugs out since this is the first implementation. * Not ok This was unmarked for some reason... I don't remember unmarking this. * DeltaV comments Added comments to explain changes. Moved localization files to the _DV folder. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Moved code Moved code to more suitable files and added some comments. * Rights for robots Now those with intrinsic radios can also emote! * Fixes up some small stuff Changes to fix some small issues with the code to align it more with modern standards. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix by-ref event Never worked with this event type before so gonna hope this works. * Update Content.Shared/Chat/SharedChatSystem.Emote.cs Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> * Update Content.Shared/Chat/SharedChatSystem.cs Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> * Update Content.Server/Chat/Systems/ChatSystem.cs Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> * fix style nits * remove conflicting chatsan --------- Signed-off-by: pathetic meowmeow <uhhadd@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pathetic meowmeow <uhhadd@gmail.com>
mnva0
left a comment
There was a problem hiding this comment.
Sorry if a review took a while. I had a look through every file and found some little things. I would've done a more thorough review but I'll leave that to the other maintainers who know C# better than me
|
Kaay! Removed extra lines and nittypicked the line commets |
rebaserHEAD
left a comment
There was a problem hiding this comment.
Needs some work and then a final review. Thanks for your efforts on this one! Chat is a real pain.
| } | ||
|
|
||
| // DeltaV | ||
| private void OnIntrinsicAudibleEmote(EntityUid uid, IntrinsicRadioTransmitterComponent component, EntityAudiblyEmotedEvent args) |
There was a problem hiding this comment.
Needs ref too, or it reads a stale copy once the headset handler starts nulling the channel correctly.
| private void OnIntrinsicAudibleEmote(EntityUid uid, IntrinsicRadioTransmitterComponent component, EntityAudiblyEmotedEvent args) | |
| private void OnIntrinsicAudibleEmote(EntityUid uid, IntrinsicRadioTransmitterComponent component, ref EntityAudiblyEmotedEvent args) |
| // Triad - Prevent speaking emotes | ||
| if (args.emType == EmoteType.Audible || args.emType == EmoteType.AudiblePossessive) | ||
| {_chat.TrySendInGameICMessage(uid, message, InGameICChatType.Emote, ChatTransmitRange.GhostRangeLimitNoAdminCheck, | ||
| nameOverride: name, checkRadioPrefix: false, languageOverride: args.Language); | ||
| return;} |
There was a problem hiding this comment.
Brace style, and this re-emits through the plain emote wrap so a possessive emote loses its 's when it comes out of a speaker. Fine to leave the fidelity bit, but the braces should go.
| // Triad - Prevent speaking emotes | |
| if (args.emType == EmoteType.Audible || args.emType == EmoteType.AudiblePossessive) | |
| {_chat.TrySendInGameICMessage(uid, message, InGameICChatType.Emote, ChatTransmitRange.GhostRangeLimitNoAdminCheck, | |
| nameOverride: name, checkRadioPrefix: false, languageOverride: args.Language); | |
| return;} | |
| // Triad - Prevent speaking emotes | |
| if (args.emType == EmoteType.Audible || args.emType == EmoteType.AudiblePossessive) | |
| { | |
| _chat.TrySendInGameICMessage(uid, message, InGameICChatType.Emote, ChatTransmitRange.GhostRangeLimitNoAdminCheck, | |
| nameOverride: name, checkRadioPrefix: false, languageOverride: args.Language); | |
| return; | |
| } |
| // if (!TryComp<HandsComponent>(uid, out var hands) || hands.Count < 1 || | ||
| // TryComp<CuffableComponent>(uid, out var cuffable) && _cuffable.IsCuffed((uid, cuffable))) | ||
| // { | ||
| // _popup.PopupEntity(Loc.GetString("headset-cant-reach"), uid, uid, PopupType.SmallCaution); | ||
| // return false; | ||
| // } | ||
|
|
||
| return true; |
There was a problem hiding this comment.
Dead block. If the reach check isn't wanted here, drop it rather than carrying commented DeltaV code we never ran. The "comment it out" rule is for upstream code we're diverging from, not for incoming ports.
| // if (!TryComp<HandsComponent>(uid, out var hands) || hands.Count < 1 || | |
| // TryComp<CuffableComponent>(uid, out var cuffable) && _cuffable.IsCuffed((uid, cuffable))) | |
| // { | |
| // _popup.PopupEntity(Loc.GetString("headset-cant-reach"), uid, uid, PopupType.SmallCaution); | |
| // return false; | |
| // } | |
| return true; | |
| return true; |
| EntityUid RadioSource, | ||
| EmoteType? emType //Triad |
There was a problem hiding this comment.
Positional record members should be PascalCase, and this one is public API that other systems now read.
| EntityUid RadioSource, | |
| EmoteType? emType //Triad | |
| EntityUid RadioSource, | |
| EmoteType? EmType //Triad |
Call sites to follow: args.emType in RadioDeviceSystem.OnReceiveRadio.
|
Gulp, hopefully I didnt break anything. >< Thanks for catching the oopsies |
mnva0
left a comment
There was a problem hiding this comment.
GitHub is still saying I need to review this but I already did a very basic review (unless my review was requested again somewhere I couldn't see?). I am commenting this in an attempt to make GitHub realize the fact I have reviewed this
Co-authored-by: rebaserHEAD <38984539+rebaserHEAD@users.noreply.github.com>
mnva0
left a comment
There was a problem hiding this comment.
I'm not sure why my review was rerequested, but I had a quick look through again. Looks fine minor-nitpickwise to me from my extremely superficial review, but I'm unqualified to review C# PRs
|
First, sorry for the slow roll on this. I appreciate your patience while I was working on a few other things. Secondly, I will say after considering this for a bit, that it's a bit odd to be able to emote over the radio which implies it's audio based in game. I might have a bit of a discussion with the other maintainers to chew this over. I'm on the fence with it leaning towards "No" but I can be convinced otherwise. |
About the PR
Cherypicked the ability to send emotes over radio, as well as emoting possessively without being spaced weird, from Delta-V
This also adds "?" as shorthand for "looks confused"
Why / Balance
Must miao on radio,,,
Media
Image from original.

Demonstration video from original.
https://github.com/user-attachments/assets/e070d97f-12c3-4042-8a36-f6bab7d00199
Requirements
How to test
Emote over radio using @![radio prefix] ex, @!; or @!:d
Emote possessively using @' ("s" not needed, or else youll look a fool)
Breaking changes
I have touched the forbidden chat code..
Changelog
🆑