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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user