瀏覽代碼

Remove unnecessary checks when serializing scene

habeebweeb 5 年之前
父節點
當前提交
21938436eb
共有 1 個文件被更改,包括 2 次插入21 次删除
  1. 2 21
      MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

+ 2 - 21
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

@@ -1536,15 +1536,6 @@ namespace CM3D2.MultipleMaids.Plugin
                 isStop[selectMaidIndex] = true;
             }
 
-            if (saveScene > 0)
-            {
-                string sceneString = SerializeScene();
-
-                Preferences["scene"]["s" + saveScene].Value = sceneString;
-                SaveConfig();
-                saveScene = 0;
-            };
-
             for (int index = 0; index < maidCnt; ++index)
             {
                 if (haraCount[index] > 0)
@@ -6945,13 +6936,8 @@ namespace CM3D2.MultipleMaids.Plugin
 
         public string SerializeScene(bool saveManager = false)
         {
-            int oldPage = page;
-            int oldSaveScene = saveScene;
-            if (saveManager)
-            {
-                page = 0;
-                saveScene = 1;
-            }
+            page = 0;
+            saveScene = 1;
             string str1 = "";
             string str2 = "";
             DateTime now = DateTime.Now;
@@ -6962,11 +6948,6 @@ namespace CM3D2.MultipleMaids.Plugin
                 date[saveScene - 1 - page * 10] = str3;
                 ninzu[saveScene - 1 - page * 10] = maidCnt.ToString() + "人";
             }
-            if (saveManager)
-            {
-                page = oldPage;
-                saveScene = oldSaveScene;
-            }
 
             string[] strArray1 = new string[7]
             {