add data reading & selection table population

This commit is contained in:
Alex
2025-08-18 00:32:10 -07:00
parent 7c407a7a84
commit f4a091dfa4
10 changed files with 249 additions and 191 deletions
+31 -3
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SaturnData.Notation.Core;
namespace MercuryConverter.Data;
@@ -20,7 +21,7 @@ public static class Consts
};
public static readonly IReadOnlyDictionary<int, string> CATEGORY_INDEX = _CATEGORY_INDEX;
private static Dictionary<int, string> _NUM_SOURCE = new()
private static Dictionary<uint, string> _NUM_SOURCE = new()
{
{ 1, string.Concat(new int[] {87, 65, 67, 67, 65}.Select(i => Convert.ToChar(i))) },
{ 2, string.Concat(new int[] {87, 65, 67, 67, 65, 32, 83}.Select(i => Convert.ToChar(i))) },
@@ -28,11 +29,38 @@ public static class Consts
{ 4, string.Concat(new int[] {87, 65, 67, 67, 65, 32, 76, 73, 76, 89, 32, 82}.Select(i => Convert.ToChar(i))) },
{ 5, string.Concat(new int[] {87, 65, 67, 67, 65, 32, 82, 101, 118, 101, 114, 115, 101}.Select(i => Convert.ToChar(i))) }
};
public static readonly IReadOnlyDictionary<int, string> NUM_SOURCE = _NUM_SOURCE;
public static readonly IReadOnlyDictionary<string, int> SOURCE_NUM = _NUM_SOURCE.ToDictionary(p => p.Value, p=>p.Key);
public static readonly IReadOnlyDictionary<uint, string> NUM_SOURCE = _NUM_SOURCE;
public static readonly IReadOnlyDictionary<string, uint> SOURCE_NUM = _NUM_SOURCE.ToDictionary(p => p.Value, p => p.Key);
private static string[] _DIFFICULTIES = {
"Normal", "Hard", "Expert", "Inferno"
};
public static readonly IReadOnlyList<string> DIFFICULTIES = _DIFFICULTIES;
private static readonly Dictionary<Difficulty, string> _DIFF_LVL_KEY = new()
{
{Difficulty.Normal, "DifficultyNormalLv"},
{Difficulty.Hard, "DifficultyHardLv"},
{Difficulty.Expert, "DifficultyExtremeLv"},
{Difficulty.Inferno, "DifficultyInfernoLv"},
};
public static readonly IReadOnlyDictionary<Difficulty, string> DIFF_LVL_KEY = _DIFF_LVL_KEY;
private static readonly Dictionary<Difficulty, string> _DIFF_FILENAME_PREPEND = new()
{
{Difficulty.Normal, "00"},
{Difficulty.Hard, "01"},
{Difficulty.Expert, "02"},
{Difficulty.Inferno, "03"},
};
public static readonly IReadOnlyDictionary<Difficulty, string> DIFF_FILENAME_PREPEND = _DIFF_FILENAME_PREPEND;
private static readonly Dictionary<Difficulty, string> _DIFF_CLEAR_KEY = new()
{
{Difficulty.Normal, "ClearNormaRateNormal"},
{Difficulty.Hard, "ClearNormaRateHard"},
{Difficulty.Expert, "ClearNormaRateExtreme"},
{Difficulty.Inferno, "ClearNormaRateInferno"},
};
public static readonly IReadOnlyDictionary<Difficulty, string> DIFF_CLEAR_KEY = _DIFF_CLEAR_KEY;
}