Emotes Menu (#26702)

* Basic emote radial menu

* Move out from corvax

* Move to UI controller & add to top menu bar and key bind

* Make emote play

* Add name localization for emotes

* Localize chat messages

* Fix emote menu

* Add categories localization

* Fixes

* Fix

* Add emotes entity blacklist

* Fix entity whitelist required all logic

* Remove unused wagging emote

* Revert sprite

* Set default texture for emote icon

* Update Resources/keybinds.yml

---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Morb
2024-04-29 07:38:23 +03:00
committed by GitHub
parent 373c368b94
commit 16b3e2233a
34 changed files with 688 additions and 57 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections.Frozen;
using Content.Shared.Chat.Prototypes;
using Content.Shared.Speech;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
@@ -80,6 +81,16 @@ public partial class ChatSystem
bool ignoreActionBlocker = false
)
{
if (!(emote.Whitelist?.IsValid(source, EntityManager) ?? true))
return;
if (emote.Blacklist?.IsValid(source, EntityManager) ?? false)
return;
if (!emote.Available &&
TryComp<SpeechComponent>(source, out var speech) &&
!speech.AllowedEmotes.Contains(emote.ID))
return;
// check if proto has valid message for chat
if (emote.ChatMessages.Count != 0)
{