diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs index 54d4c96..022b637 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs @@ -234,6 +234,12 @@ namespace Bloxstrap.UI.Elements.Menu.Pages if (App.FastFlags.Prop.ContainsKey(pair.Key) && !overwriteConflicting) continue; + // TODO - error message, i just had to hastily add this in + // as i'm currently testing 2.7.0 for release and all translations + // are already done + if (pair.Value is not string) + continue; + if (!ValidateFlagEntry(pair.Key, (string)pair.Value)) continue; @@ -252,10 +258,10 @@ namespace Bloxstrap.UI.Elements.Menu.Pages errorMessage = Bloxstrap.Resources.Strings.Menu_FastFlagEditor_InvalidPrefix; else if (!name.All(x => char.IsLetterOrDigit(x) || x == '_')) errorMessage = Bloxstrap.Resources.Strings.Menu_FastFlagEditor_InvalidCharacter; - else if (name[..6].Contains("FFlag") && lowerValue != "true" && lowerValue != "false") - errorMessage = Bloxstrap.Resources.Strings.Menu_FastFlagEditor_InvalidBoolValue; - else if (name[..5].Contains("FInt") && !Int32.TryParse(value, out _)) + else if ((name.StartsWith("FInt") || name.StartsWith("DFInt")) && !Int32.TryParse(value, out _)) errorMessage = Bloxstrap.Resources.Strings.Menu_FastFlagEditor_InvalidNumberValue; + else if ((name.StartsWith("FFlag") || name.StartsWith("DFFlag")) && lowerValue != "true" && lowerValue != "false") + errorMessage = Bloxstrap.Resources.Strings.Menu_FastFlagEditor_InvalidBoolValue; if (!String.IsNullOrEmpty(errorMessage)) {