From 24bb967ffce73be9894de88d419ce5a11e3307b3 Mon Sep 17 00:00:00 2001 From: dffdff2423 Date: Sat, 18 May 2024 19:23:44 -0500 Subject: [PATCH] Fix Flavor Text editor not saving correctly (#28122) * Check for flavor text equality in profile. * Fix some characters being deleted from flavor text Sometimes the last few characters of the flavor text would get deleted. This fixes this issue. --- Content.Client/FlavorText/FlavorText.xaml.cs | 2 +- Content.Shared/Preferences/HumanoidCharacterProfile.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Client/FlavorText/FlavorText.xaml.cs b/Content.Client/FlavorText/FlavorText.xaml.cs index ffcf653f11..91b59046a4 100644 --- a/Content.Client/FlavorText/FlavorText.xaml.cs +++ b/Content.Client/FlavorText/FlavorText.xaml.cs @@ -17,7 +17,7 @@ namespace Content.Client.FlavorText var loc = IoCManager.Resolve(); CFlavorTextInput.Placeholder = new Rope.Leaf(loc.GetString("flavor-text-placeholder")); - CFlavorTextInput.OnKeyBindDown += _ => FlavorTextChanged(); + CFlavorTextInput.OnTextChanged += _ => FlavorTextChanged(); } public void FlavorTextChanged() diff --git a/Content.Shared/Preferences/HumanoidCharacterProfile.cs b/Content.Shared/Preferences/HumanoidCharacterProfile.cs index 6a297bb1f2..682b0d700f 100644 --- a/Content.Shared/Preferences/HumanoidCharacterProfile.cs +++ b/Content.Shared/Preferences/HumanoidCharacterProfile.cs @@ -396,6 +396,7 @@ namespace Content.Shared.Preferences if (!_antagPreferences.SequenceEqual(other._antagPreferences)) return false; if (!_traitPreferences.SequenceEqual(other._traitPreferences)) return false; if (!Loadouts.SequenceEqual(other.Loadouts)) return false; + if (FlavorText != other.FlavorText) return false; return Appearance.MemberwiseEquals(other.Appearance); }