From f18564cadd2c4e95e2dfe508585550e54462b2e5 Mon Sep 17 00:00:00 2001 From: Milon Date: Thu, 26 Sep 2024 16:59:31 +0200 Subject: [PATCH] quick fix --- Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml.cs b/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml.cs index 0dc41f807ab..942b43acb56 100644 --- a/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml.cs +++ b/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml.cs @@ -31,17 +31,18 @@ public VoiceMaskNameChangeWindow() OnVerbChange?.Invoke((string?) args.Button.GetItemMetadata(args.Id)); SpeechVerbSelector.SelectId(args.Id); }; - - AddVerbs(); + // AddVerbs(); // DeltaV } public void ReloadVerbs(IPrototypeManager proto) { + _verbs.Clear(); // DeltaV foreach (var verb in proto.EnumeratePrototypes()) { _verbs.Add((Loc.GetString(verb.Name), verb.ID)); } _verbs.Sort((a, b) => a.Item1.CompareTo(b.Item1)); + AddVerbs(); // DeltaV } private void AddVerbs() @@ -73,7 +74,7 @@ public void UpdateState(string name, string? verb) for (int id = 0; id < SpeechVerbSelector.ItemCount; id++) { - if (string.Equals(verb, SpeechVerbSelector.GetItemMetadata(id))) + if (string.Equals(verb, (string?)SpeechVerbSelector.GetItemMetadata(id))) // DeltaV { SpeechVerbSelector.SelectId(id); break;