muffin v6.35 with old pdb
This commit is contained in:
parent
ac85599236
commit
b5d2cc6708
31 changed files with 958 additions and 958 deletions
|
|
@ -82,30 +82,30 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
public void DrawDetailWindows()
|
||||
{
|
||||
List<int> list = new List<int>();
|
||||
foreach (KeyValuePair<int, bool> item in _openDetailWindows.ToList())
|
||||
List<int> tab = new List<int>();
|
||||
foreach (KeyValuePair<int, bool> neverFly in _openDetailWindows.ToList())
|
||||
{
|
||||
if (item.Value && _storedIssues.TryGetValue(item.Key, out ValidationIssue value))
|
||||
if (neverFly.Value && _storedIssues.TryGetValue(neverFly.Key, out ValidationIssue additionalStatusInformation))
|
||||
{
|
||||
string obj = $"Validation Details##{item.Key}";
|
||||
string obj = $"Validation Details##{neverFly.Key}";
|
||||
bool open = true;
|
||||
ImGui.SetNextWindowSize(new Vector2(800f, 600f), ImGuiCond.FirstUseEver);
|
||||
ImGui.SetNextWindowSizeConstraints(new Vector2(500f, 300f), new Vector2(1200f, 800f));
|
||||
if (ImGui.Begin(obj, ref open))
|
||||
{
|
||||
DrawIssueDetails(value);
|
||||
DrawIssueDetails(additionalStatusInformation);
|
||||
ImGui.End();
|
||||
}
|
||||
if (!open)
|
||||
{
|
||||
list.Add(item.Key);
|
||||
tab.Add(neverFly.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (int item2 in list)
|
||||
foreach (int combatDataOverlay in tab)
|
||||
{
|
||||
_openDetailWindows.Remove(item2);
|
||||
_storedIssues.Remove(item2);
|
||||
_openDetailWindows.Remove(combatDataOverlay);
|
||||
_storedIssues.Remove(combatDataOverlay);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -184,10 +184,10 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private static void DrawJsonSyntaxErrorDetails(string description)
|
||||
{
|
||||
string[] array = description.Split('\n');
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
string[] tab = description.Split('\n');
|
||||
for (int runInstancedContentWithAutoDuty = 0; runInstancedContentWithAutoDuty < tab.Length; runInstancedContentWithAutoDuty++)
|
||||
{
|
||||
string text = array[i].Trim();
|
||||
string text = tab[runInstancedContentWithAutoDuty].Trim();
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
ImGui.Spacing();
|
||||
|
|
@ -222,15 +222,15 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private void DrawDisabledTribesDetails(string description)
|
||||
{
|
||||
string[] array = description.Split(':', 2);
|
||||
if (array.Length < 2)
|
||||
string[] child = description.Split(':', 2);
|
||||
if (child.Length < 2)
|
||||
{
|
||||
ImGui.TextWrapped(description);
|
||||
return;
|
||||
}
|
||||
ImGui.TextWrapped(array[0]);
|
||||
ImGui.TextWrapped(child[0]);
|
||||
ImGui.Spacing();
|
||||
List<string> list = (from x in array[1].Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
List<string> list = (from x in child[1].Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
select x.Trim() into x
|
||||
where !string.IsNullOrEmpty(x)
|
||||
select x).Distinct().ToList();
|
||||
|
|
@ -241,7 +241,7 @@ internal sealed class ValidationDetailsRenderer
|
|||
}
|
||||
ImGui.Text("Disabled Quests:");
|
||||
ImGui.Indent();
|
||||
Vector4[] array2 = new Vector4[6]
|
||||
Vector4[] array = new Vector4[6]
|
||||
{
|
||||
ImGuiColors.TankBlue,
|
||||
ImGuiColors.HealerGreen,
|
||||
|
|
@ -250,29 +250,29 @@ internal sealed class ValidationDetailsRenderer
|
|||
ImGuiColors.ParsedBlue,
|
||||
ImGuiColors.DalamudViolet
|
||||
};
|
||||
for (int num = 0; num < list.Count; num++)
|
||||
for (int expansion = 0; expansion < list.Count; expansion++)
|
||||
{
|
||||
string value = list[num];
|
||||
Vector4 color = array2[num % array2.Length];
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, color))
|
||||
string enabledCount = list[expansion];
|
||||
Vector4 totalCount = array[expansion % array.Length];
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, totalCount))
|
||||
{
|
||||
if (ElementId.TryFromString(value, out ElementId elementId) && elementId != null)
|
||||
if (ElementId.TryFromString(enabledCount, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
IQuestInfo questInfo = _questData.GetQuestInfo(elementId);
|
||||
IQuestInfo table = _questData.GetQuestInfo(elementId);
|
||||
ImU8String text = new ImU8String(5, 2);
|
||||
text.AppendLiteral("\ufffd ");
|
||||
text.AppendFormatted(value);
|
||||
text.AppendFormatted(enabledCount);
|
||||
text.AppendLiteral(" - ");
|
||||
text.AppendFormatted(questInfo.Name);
|
||||
text.AppendFormatted(table.Name);
|
||||
ImGui.TextWrapped(text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
ImU8String text = new ImU8String(18, 1);
|
||||
text.AppendLiteral("\ufffd ");
|
||||
text.AppendFormatted(value);
|
||||
text.AppendFormatted(enabledCount);
|
||||
text.AppendLiteral(" (unknown quest)");
|
||||
ImGui.TextWrapped(text);
|
||||
}
|
||||
|
|
@ -281,7 +281,7 @@ internal sealed class ValidationDetailsRenderer
|
|||
{
|
||||
ImU8String text = new ImU8String(2, 1);
|
||||
text.AppendLiteral("\ufffd ");
|
||||
text.AppendFormatted(value);
|
||||
text.AppendFormatted(enabledCount);
|
||||
ImGui.TextWrapped(text);
|
||||
}
|
||||
}
|
||||
|
|
@ -296,15 +296,15 @@ internal sealed class ValidationDetailsRenderer
|
|||
ImGui.TextWrapped("No validation details available.");
|
||||
return;
|
||||
}
|
||||
List<JsonValidationError> list = ParseJsonValidationErrors(description);
|
||||
if (list.Count > 0)
|
||||
List<JsonValidationError> cfcNames = ParseJsonValidationErrors(description);
|
||||
if (cfcNames.Count > 0)
|
||||
{
|
||||
ImGui.Text("JSON Schema Validation Errors:");
|
||||
ImGui.Spacing();
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
for (int enabledCount = 0; enabledCount < cfcNames.Count; enabledCount++)
|
||||
{
|
||||
DrawJsonValidationError(list[i], i);
|
||||
if (i < list.Count - 1)
|
||||
DrawJsonValidationError(cfcNames[enabledCount], enabledCount);
|
||||
if (enabledCount < cfcNames.Count - 1)
|
||||
{
|
||||
ImGui.Separator();
|
||||
}
|
||||
|
|
@ -390,8 +390,8 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private static void DrawSimpleJsonSchemaDetails(string description)
|
||||
{
|
||||
string[] array = description.Split('\n');
|
||||
foreach (string text in array)
|
||||
string[] clipboardText = description.Split('\n');
|
||||
foreach (string text in clipboardText)
|
||||
{
|
||||
if (text.StartsWith("JSON Validation failed:", StringComparison.Ordinal))
|
||||
{
|
||||
|
|
@ -402,11 +402,11 @@ internal sealed class ValidationDetailsRenderer
|
|||
}
|
||||
else if (text.StartsWith(" - ", StringComparison.Ordinal))
|
||||
{
|
||||
int num = text.IndexOf(':', 3);
|
||||
if (num > 0)
|
||||
int whitelisted = text.IndexOf(':', 3);
|
||||
if (whitelisted > 0)
|
||||
{
|
||||
string path = text.Substring(3, num - 3).Trim();
|
||||
string text2 = CleanJsonText(text.Substring(num + 1).Trim());
|
||||
string blacklisted = text.Substring(3, whitelisted - 3).Trim();
|
||||
string text2 = CleanJsonText(text.Substring(whitelisted + 1).Trim());
|
||||
if (string.Equals(text2, "validation failed", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
text2 = "Schema validation failed - check property format and values";
|
||||
|
|
@ -415,7 +415,7 @@ internal sealed class ValidationDetailsRenderer
|
|||
ImGui.SameLine();
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue))
|
||||
{
|
||||
ImGui.Text(FormatJsonPath(path));
|
||||
ImGui.Text(FormatJsonPath(blacklisted));
|
||||
}
|
||||
ImGui.SameLine();
|
||||
ImGui.Text(":");
|
||||
|
|
@ -477,12 +477,12 @@ internal sealed class ValidationDetailsRenderer
|
|||
Match match = JsonPropertyPathRegex.Match(path);
|
||||
if (match.Success)
|
||||
{
|
||||
string value = match.Groups[1].Value;
|
||||
if (string.IsNullOrEmpty(value))
|
||||
string mounts = match.Groups[1].Value;
|
||||
if (string.IsNullOrEmpty(mounts))
|
||||
{
|
||||
return "<root>";
|
||||
}
|
||||
return value.Replace('/', '.');
|
||||
return mounts.Replace('/', '.');
|
||||
}
|
||||
if (!(path == "<root>"))
|
||||
{
|
||||
|
|
@ -493,40 +493,40 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private static List<string> GetValidationSuggestions(JsonValidationError error)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
List<string> tab = new List<string>();
|
||||
foreach (string message in error.Messages)
|
||||
{
|
||||
string text = message.ToUpperInvariant();
|
||||
if (text.Contains("REQUIRED", StringComparison.Ordinal))
|
||||
string grandCompany = message.ToUpperInvariant();
|
||||
if (grandCompany.Contains("REQUIRED", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Add the missing required property to your JSON.");
|
||||
tab.Add("Add the missing required property to your JSON.");
|
||||
}
|
||||
else if (text.Contains("TYPE", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("TYPE", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Check that the property value has the correct data type (string, number, boolean, etc.).");
|
||||
tab.Add("Check that the property value has the correct data type (string, number, boolean, etc.).");
|
||||
}
|
||||
else if (text.Contains("ENUM", StringComparison.Ordinal) || text.Contains("ALLOWED VALUES", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("ENUM", StringComparison.Ordinal) || grandCompany.Contains("ALLOWED VALUES", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Use one of the allowed enumeration values for this property.");
|
||||
tab.Add("Use one of the allowed enumeration values for this property.");
|
||||
}
|
||||
else if (text.Contains("FORMAT", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("FORMAT", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Ensure the property value follows the expected format.");
|
||||
tab.Add("Ensure the property value follows the expected format.");
|
||||
}
|
||||
else if (text.Contains("MINIMUM", StringComparison.Ordinal) || text.Contains("MAXIMUM", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("MINIMUM", StringComparison.Ordinal) || grandCompany.Contains("MAXIMUM", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Check that numeric values are within the allowed range.");
|
||||
tab.Add("Check that numeric values are within the allowed range.");
|
||||
}
|
||||
else if (text.Contains("ADDITIONAL", StringComparison.Ordinal) && text.Contains("NOT ALLOWED", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("ADDITIONAL", StringComparison.Ordinal) && grandCompany.Contains("NOT ALLOWED", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Remove any extra properties that are not defined in the schema.");
|
||||
tab.Add("Remove any extra properties that are not defined in the schema.");
|
||||
}
|
||||
else if (text.Contains("VALIDATION FAILED", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("VALIDATION FAILED", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Review the JSON structure and ensure all properties match the expected schema format.");
|
||||
tab.Add("Review the JSON structure and ensure all properties match the expected schema format.");
|
||||
}
|
||||
}
|
||||
return list.Distinct().ToList();
|
||||
return tab.Distinct().ToList();
|
||||
}
|
||||
|
||||
private static void DrawGenericDetails(string description)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue