Beispiel #1
0
        }   // End of LoadOtherDate

        public static void LoadFameDate(string root, string name)
        {
            if (DateLoader.LoadBaseDate(root, name, out Dictionary <int, Dictionary <int, string> > FameDate) &&
                DateLoader.IndexCheck("FameDate", FameDate, DateFile.instance.actorFameDate))
            {
                int cnt = 0;
                lock (DateFile.instance.actorFameDate)
                {
                    foreach (int id in FameDate.Keys)
                    {
                        if (!DateFile.instance.actorFameDate.Keys.Contains(id))
                        {
                            DateFile.instance.actorFameDate.Add(id, FameDate[id]);
                            cnt++;
                            Main.Logger.Log($"成功载入名誉影响{FameDate[id][0]}, ID:{id}.");
                        }
                    }
                }
                Main.Logger.Log($"成功载入{cnt}/{FameDate.Keys.ToArray().Length}个名誉影响");
            }
            else
            {
                Main.Logger.Log($"载入名誉项失败");
            }
        }
Beispiel #2
0
 public static Dictionary <int, int> LoadTipsMassage(string root, string name)
 {
     if (DateLoader.LoadBaseDate(root, name, out Dictionary <int, Dictionary <int, string> > TipsMassageDate)
         //&& DateLoader.IndexCheck("TipsMassageDate", TipsMassageDate, DateFile.instance.actorFameDate)
         )
     {
         Dictionary <int, int> idRemap = new Dictionary <int, int>();
         int cnt   = 0;
         int maxid = GetMaxid(DateFile.instance.tipsMassageDate);
         lock (DateFile.instance.tipsMassageDate)
         {
             foreach (int id in TipsMassageDate.Keys)
             {
                 idRemap.Add(id, id + maxid);
                 if (!DateFile.instance.tipsMassageDate.Keys.Contains(idRemap[id]))
                 {
                     DateFile.instance.tipsMassageDate.Add(idRemap[id], TipsMassageDate[id]);
                     cnt++;
                 }
             }
         }
         Main.Logger.Log($"成功载入{cnt}/{TipsMassageDate.Keys.ToArray().Length}个提示信息");
     }
     else
     {
         Main.Logger.Log($"载入提示信息失败");
     }
     return(null);
 }
Beispiel #3
0
            //[HarmonyBefore("characterFolatInfo")]
            public static void Postfix()
            {
                Index.EventIndex = DateLoader.LoadEventDate(Main.txtpath, "Event_Date.txt");
                DateLoader.LoadFameDate(txtpath, "Fame_Date.txt");
                //Index.TipsMassageIndex = DateLoader.LoadTipsMassage(txtpath, "TipsMassage_Date.txt");

                Logger.Log("开始初始化事件管理器");
                DateFile.EventMethodManager.RegisterEventBase(typeof(EventExtentionHandle));
                //Index.GongFaPowerIndex = SevenNineLove.LoadGongFaPower(Main.txtpath, "GayMax_GongFaPower_Date.txt",
                //    "GayMax_GongFaAntiPower_Date.txt", true);
                //Index.GongFaIndex = SevenNineLove.LoadGongFa(Main.txtpath, "GayMax_GongFa_Date.txt", Index.GongFaPowerIndex,
                //    Main.settings.gongbase);
                //Index.TurnEvenIndex = SevenNineLove.LoadOtherDate(Main.txtpath, "GayMax_TrunEvent_Date.txt",
                //    ref DateFile.instance.trunEventDate);
            }