Code cleanup.

This commit is contained in:
2022-11-09 13:53:53 +08:00
parent 1f621082c6
commit 55efc7a428
4 changed files with 9 additions and 16 deletions

View File

@@ -22,13 +22,16 @@ namespace Cryville.Crtr {
public readonly Dictionary<int, ScoreDefinition> scoreDefs = new Dictionary<int, ScoreDefinition>();
public readonly Dictionary<int, float> scores = new Dictionary<int, float>();
readonly Dictionary<int, string> ScoreCache = new Dictionary<int, string>();
readonly object _lock = new object();
public Dictionary<int, string> GetFormattedScoreStrings() {
lock (_lock) {
if (ScoreCache.Count == 0) {
foreach (var s in scores)
ScoreCache.Add(s.Key, s.Value.ToString(scoreDefs[s.Key].format));
}
return ScoreCache;
}
}
public string GetFullFormattedScoreString() {
bool flag = false;
string result = "";