]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Flavor Text editor not saving correctly (#28122)
authordffdff2423 <dffdff2423@gmail.com>
Sun, 19 May 2024 00:23:44 +0000 (19:23 -0500)
committerGitHub <noreply@github.com>
Sun, 19 May 2024 00:23:44 +0000 (02:23 +0200)
* 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
Content.Shared/Preferences/HumanoidCharacterProfile.cs

index ffcf653f119a25edf53f3975d20a366f0491f86f..91b59046a47715e50dc5321ac0f1ec6485381293 100644 (file)
@@ -17,7 +17,7 @@ namespace Content.Client.FlavorText
 
             var loc = IoCManager.Resolve<ILocalizationManager>();
             CFlavorTextInput.Placeholder = new Rope.Leaf(loc.GetString("flavor-text-placeholder"));
-            CFlavorTextInput.OnKeyBindDown  += _ => FlavorTextChanged();
+            CFlavorTextInput.OnTextChanged  += _ => FlavorTextChanged();
         }
 
         public void FlavorTextChanged()
index fd679c7796ea71dc3214da507142416677120ea8..f47a3ac3dbe71f3e60e16460c8f1913eb8e81adb 100644 (file)
@@ -387,6 +387,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);
         }