yyl
2026-03-26 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7
Main/Config/PartialConfigs/DirtyWordConfig.cs
@@ -1,8 +1,8 @@
    using System;
    using System.Collections.Generic;
    using System.Text.RegularExpressions;
    using Cysharp.Threading.Tasks;
    using UnityEngine;
    using System.Threading;
    public partial class DirtyWordConfig : ConfigBase<int, DirtyWordConfig>
    {
@@ -194,31 +194,38 @@
            }
            dirtyWordInited = true;
            DirtyWordInitAsync().Forget();
        }
            ThreadPool.QueueUserWorkItem((object aaa) =>
        private static async UniTaskVoid DirtyWordInitAsync()
        {
            memoryList.Sort((string x, string y) =>
            {
                memoryList.Sort((string x, string y) =>
                {
                    return x.CompareTo(y);
                });
                for (int i = memoryList.Count - 1; i > 0; i--)
                {
                    if (memoryList[i].ToString() == memoryList[i - 1].ToString())
                    {
                        memoryList.RemoveAt(i);
                    }
                }
                foreach (string word in memoryList)
                {
                    WordGroup group = DIRTYWORLD[(int)word[0]];
                    if (group == null)
                    {
                        group = new WordGroup();
                        DIRTYWORLD[(int)word[0]] = group;
                    }
                    group.Add(word.Substring(1));
                }
                return x.CompareTo(y);
            });
            await UniTask.Yield();
            for (int i = memoryList.Count - 1; i > 0; i--)
            {
                if (memoryList[i].ToString() == memoryList[i - 1].ToString())
                {
                    memoryList.RemoveAt(i);
                }
            }
            await UniTask.Yield();
            int count = 0;
            foreach (string word in memoryList)
            {
                WordGroup group = DIRTYWORLD[(int)word[0]];
                if (group == null)
                {
                    group = new WordGroup();
                    DIRTYWORLD[(int)word[0]] = group;
                }
                group.Add(word.Substring(1));
                count++;
                if (count % 100 == 0)
                    await UniTask.Yield();
            }
        }
        public static bool IsCHS(char character)