From 5a039bb558a9535fd6ac8ad729686943ddfb3912 Mon Sep 17 00:00:00 2001 From: Kotovskiy34 <77529717+wCATw@users.noreply.github.com> Date: Fri, 5 May 2023 15:23:39 +0300 Subject: [PATCH] [fix] Remove excess emotions (ReFix) (#19) --- .../Systems/Emotions/EmotionsUIController.cs | 3 +- .../Chat/Prototypes/EmotePrototype.cs | 11 ++++--- Resources/Prototypes/emotes.yml | 33 ++++++++++++------- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/Content.Client/UserInterface/Systems/Emotions/EmotionsUIController.cs b/Content.Client/UserInterface/Systems/Emotions/EmotionsUIController.cs index 562438e3ed..c1d74b425b 100644 --- a/Content.Client/UserInterface/Systems/Emotions/EmotionsUIController.cs +++ b/Content.Client/UserInterface/Systems/Emotions/EmotionsUIController.cs @@ -35,11 +35,12 @@ public sealed class EmotionsUIController : UIController, IOnStateChanged().ToList(); - emotions = emotions.Where(emote => emote.Category == EmoteCategory.White).ToList(); emotions.Sort((a,b) => string.Compare(a.ButtonText, b.ButtonText.ToString(), StringComparison.Ordinal)); foreach (var emote in emotions) { + if (!emote.AllowToEmotionsMenu) + continue; var control = new Button(); control.OnPressed += _ => UseEmote(_random.Pick(emote.ChatMessages)); control.Text = emote.ButtonText; diff --git a/Content.Shared/Chat/Prototypes/EmotePrototype.cs b/Content.Shared/Chat/Prototypes/EmotePrototype.cs index 642ed9f79a..c5aaa8d513 100644 --- a/Content.Shared/Chat/Prototypes/EmotePrototype.cs +++ b/Content.Shared/Chat/Prototypes/EmotePrototype.cs @@ -35,12 +35,16 @@ public sealed partial class EmotePrototype : IPrototype [DataField("chatTriggers")] public HashSet? ChatTriggers = new(); - /// + /// White Dream EDIT Start /// Текст для кнопки в эмоут меню. /// Бля ну или как это описать, вы поняли короче. ¯\_(ツ)_/¯ /// [DataField("buttonText")] public string ButtonText { get; } = "Unknown"; + + [DataField("allowMenu")] + public bool AllowToEmotionsMenu { get; } = false; + // White Dream EDIT end } /// @@ -53,7 +57,6 @@ public enum EmoteCategory : byte { Invalid = 0, Vocal = 1 << 0, - Gesture = 1 << 1, - General = byte.MaxValue, - White = byte.MaxValue + Gesture = 1 << 1, // White Dream EDIT + General = byte.MaxValue } diff --git a/Resources/Prototypes/emotes.yml b/Resources/Prototypes/emotes.yml index ba967b9d52..c6bc63f12f 100644 --- a/Resources/Prototypes/emotes.yml +++ b/Resources/Prototypes/emotes.yml @@ -1,6 +1,6 @@ - type: emote id: Scream - category: White + category: Vocal buttonText: Кричать chatMessages: [кричит, орет, вопит, рявкает] chatTriggers: @@ -19,10 +19,11 @@ - рявкнул - рявкнула - вопит + allowMenu: true - type: emote id: Laugh - category: White + category: Vocal buttonText: Смеяться chatMessages: [смеется, ржет, усмехается, хохочет, гогочет] chatTriggers: @@ -40,10 +41,11 @@ - усмехнулся - хохочет - гогочет + allowMenu: true - type: emote id: Clap - category: White + category: Gesture buttonText: Хлопать chatMessages: [хлопает] chatTriggers: @@ -51,10 +53,11 @@ - захлопала - захлопал - похлопал + allowMenu: true - type: emote id: Snap - category: White + category: Gesture buttonText: Щелкать пальцами chatMessages: [щелкает пальцами] chatTriggers: @@ -64,45 +67,53 @@ - щелкнула - щелкунл пальцами - щелкунла пальцами + allowMenu: true - type: emote id: WaveHand - category: White + category: Gesture buttonText: Махать рукой chatMessages: [машет рукой] + allowMenu: true - type: emote id: Nod - category: White + category: Gesture buttonText: Кивать chatMessages: [кивает] + allowMenu: true - type: emote id: ShakeHead - category: White + category: Gesture buttonText: Покачать головой chatMessages: [качает головой] + allowMenu: true - type: emote id: Frown - category: White + category: Gesture buttonText: Хмуриться chatMessages: [хмурится] + allowMenu: true - type: emote id: Smile - category: White + category: Gesture buttonText: Улыбаться chatMessages: [улыбается] + allowMenu: true - type: emote id: Sniff - category: White + category: Gesture buttonText: Принюхиваться chatMessages: [принюхивается] + allowMenu: true - type: emote id: LickLips - category: White + category: Gesture buttonText: Облизываться chatMessages: [облизывается] + allowMenu: true