Browse Source

Clean up more code

denikson 5 years ago
parent
commit
de3d595244

+ 68 - 74
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Gui.cs

@@ -104,7 +104,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 parCombo.height = rectWin.height;
                 lightCombo.height = rectWin.height;
                 GameMain.Instance.MainCamera.SetControl(true);
-                if (!sceneFlg && !faceFlg && (!poseFlg && !kankyoFlg) && (!kankyo2Flg && !isF6) && okFlg)
+                if (!sceneFlg && !faceFlg && !poseFlg && !kankyoFlg && !kankyo2Flg && !isF6 && okFlg)
                 {
                     if (Input.GetAxis("Mouse ScrollWheel") != 0.0)
                     {
@@ -578,7 +578,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (!isF6)
                 {
                     bool flag = true;
-                    if (faceFlg || poseFlg || (sceneFlg || kankyoFlg) || kankyo2Flg)
+                    if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
                     {
                         flag = false;
                     }
@@ -661,7 +661,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     kankyo2Flg = true;
                 }
 
-                if (!(bool)line1)
+                if (!line1)
                 {
                     line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
                     line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
@@ -678,7 +678,7 @@ namespace CM3D2.MultipleMaids.Plugin
             }
 
             if (kankyoCombo.isClickedComboButton || slotCombo.isClickedComboButton
-                                                 || (itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton))
+                                                 || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
             {
                 GUI.enabled = false;
             }
@@ -1169,8 +1169,8 @@ namespace CM3D2.MultipleMaids.Plugin
             }
 
             IOrderedEnumerable<SortItem> orderedEnumerable = sortList
-                                                             .OrderBy<SortItem, int>(p => p.order)
-                                                             .ThenBy<SortItem, string>(p => p.name);
+                                                             .OrderBy(p => p.order)
+                                                             .ThenBy(p => p.name);
             List<SortItem> sortItemList = new List<SortItem>();
             string str4 = "";
             foreach (SortItem sortItem in orderedEnumerable)
@@ -1222,22 +1222,22 @@ namespace CM3D2.MultipleMaids.Plugin
             {
                 listStyle2.normal.textColor = Color.white;
                 listStyle2.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
-                listStyle2.onHover.background = (listStyle2.hover.background = new Texture2D(2, 2));
+                listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
                 RectOffset padding = listStyle2.padding;
                 RectOffset padding2 = listStyle2.padding;
                 RectOffset padding3 = listStyle2.padding;
                 int num = listStyle2.padding.bottom = GetPix(0);
-                num = (padding3.top = num);
-                num = (padding2.right = num);
+                num = padding3.top = num;
+                num = padding2.right = num;
                 padding.left = num;
                 listStyle2.fontSize = GetPix(11);
                 listStyle3.normal.textColor = Color.white;
                 listStyle3.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
-                listStyle3.onHover.background = (listStyle3.hover.background = new Texture2D(2, 2));
+                listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
                 RectOffset padding4 = listStyle3.padding;
                 RectOffset padding5 = listStyle3.padding;
-                num = (listStyle3.padding.top = GetPix(0));
-                num = (padding5.right = num);
+                num = listStyle3.padding.top = GetPix(0);
+                num = padding5.right = num;
                 padding4.left = num;
                 listStyle3.padding.bottom = GetPix(0);
                 listStyle3.fontSize = GetPix(12);
@@ -1447,12 +1447,11 @@ namespace CM3D2.MultipleMaids.Plugin
                     kankyoFlg = false;
                     kankyo2Flg = false;
                     bGui = true;
-                    int i = 0;
-                    while (i < 10)
+                    for (int i = 0; i < 10; i++)
                     {
                         date[i] = "未保存";
                         ninzu[i] = "";
-                        IniKey iniKey = base.Preferences["scene"]["s" + (page * 10 + i + 1)];
+                        IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
                         if (iniKey.Value != null && iniKey.Value.ToString() != "")
                         {
                             string[] array = iniKey.Value.Split(new char[] { '_' });
@@ -1463,11 +1462,6 @@ namespace CM3D2.MultipleMaids.Plugin
                                 ninzu[i] = array2[1] + "人";
                             }
                         }
-
-                    IL_4FA1:
-                        i++;
-                        continue;
-                        goto IL_4FA1;
                     }
                 }
             }
@@ -2260,16 +2254,16 @@ namespace CM3D2.MultipleMaids.Plugin
                     isKamiyure = flag3;
                     if (isKamiyure)
                     {
-                        base.Preferences["config"]["hair_setting"].Value = "true";
-                        base.Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
-                        base.Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
-                        base.Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
-                        base.SaveConfig();
+                        Preferences["config"]["hair_setting"].Value = "true";
+                        Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
+                        Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
+                        Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
+                        SaveConfig();
                     }
                     else
                     {
-                        base.Preferences["config"]["hair_setting"].Value = "false";
-                        base.SaveConfig();
+                        Preferences["config"]["hair_setting"].Value = "false";
+                        SaveConfig();
                         for (int j = 0; j < maidCnt; j++)
                         {
                             for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
@@ -2316,8 +2310,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (kamiyure4 != num4)
                 {
                     kamiyure4 = num4;
-                    base.Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
-                    base.SaveConfig();
+                    Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
+                    SaveConfig();
                 }
 
                 GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
@@ -2333,8 +2327,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (kamiyure2 != num5)
                 {
                     kamiyure2 = num5;
-                    base.Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
-                    base.SaveConfig();
+                    Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
+                    SaveConfig();
                 }
 
                 GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
@@ -2350,8 +2344,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (kamiyure3 != num6)
                 {
                     kamiyure3 = num6;
-                    base.Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
-                    base.SaveConfig();
+                    Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
+                    SaveConfig();
                 }
 
                 GUI.enabled = true;
@@ -2380,16 +2374,16 @@ namespace CM3D2.MultipleMaids.Plugin
                     isSkirtyure = flag4;
                     if (isSkirtyure)
                     {
-                        base.Preferences["config"]["skirt_setting"].Value = "true";
-                        base.Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
-                        base.Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
-                        base.Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
-                        base.SaveConfig();
+                        Preferences["config"]["skirt_setting"].Value = "true";
+                        Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
+                        Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
+                        Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
+                        SaveConfig();
                     }
                     else
                     {
-                        base.Preferences["config"]["skirt_setting"].Value = "false";
-                        base.SaveConfig();
+                        Preferences["config"]["skirt_setting"].Value = "false";
+                        SaveConfig();
                         for (int j = 0; j < maidCnt; j++)
                         {
                             for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
@@ -2429,8 +2423,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (skirtyure4 != num4)
                 {
                     skirtyure4 = num4;
-                    base.Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
-                    base.SaveConfig();
+                    Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
+                    SaveConfig();
                 }
 
                 GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
@@ -2446,8 +2440,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (skirtyure2 != num5)
                 {
                     skirtyure2 = num5;
-                    base.Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
-                    base.SaveConfig();
+                    Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
+                    SaveConfig();
                 }
 
                 GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
@@ -2463,8 +2457,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (skirtyure3 != num6)
                 {
                     skirtyure3 = num6;
-                    base.Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
-                    base.SaveConfig();
+                    Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
+                    SaveConfig();
                 }
 
                 GUI.enabled = true;
@@ -2676,7 +2670,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     gameObject2 = GameMain.Instance.BgMgr.CreateAssetBundle(array3[1]);
                     if (gameObject2 != null)
                     {
-                        gameObject2 = Instantiate<GameObject>(gameObject2);
+                        gameObject2 = Instantiate(gameObject2);
                         MeshRenderer[] componentsInChildren = gameObject2.GetComponentsInChildren<MeshRenderer>();
                         for (int k = 0; k < componentsInChildren.Length; k++)
                         {
@@ -2698,7 +2692,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 else if (!parArray[parIndex].StartsWith("mirror") && parArray[parIndex].IndexOf(":") < 0)
                 {
                     Object @object = Resources.Load("Prefab/" + parArray[parIndex]);
-                    gameObject2 = (Instantiate(@object) as GameObject);
+                    gameObject2 = Instantiate(@object) as GameObject;
                     doguBObject.Add(gameObject2);
                 }
                 else if (parArray[parIndex].StartsWith("mirror"))
@@ -2929,7 +2923,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         }
                         else
                         {
-                            gameObject2 = (Instantiate(tmpObj) as GameObject);
+                            gameObject2 = Instantiate(tmpObj) as GameObject;
                         }
                     }
                     else if (!string.IsNullOrEmpty(objResult.create_asset_bundle_name))
@@ -2941,7 +2935,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         }
                         else
                         {
-                            gameObject2 = Instantiate<GameObject>(gameObject3);
+                            gameObject2 = Instantiate(gameObject3);
                         }
                     }
                     else if (!string.IsNullOrEmpty(objResult.direct_file))
@@ -2973,7 +2967,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         @object = Resources.Load("Prefab/" + doguBArray[doguBIndex]);
                     }
 
-                    gameObject2 = (Instantiate(@object) as GameObject);
+                    gameObject2 = Instantiate(@object) as GameObject;
                     doguBObject.Add(gameObject2);
                 }
                 else
@@ -3786,7 +3780,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (!isF6)
                 {
                     bool flag = true;
-                    if (faceFlg || poseFlg || (sceneFlg || kankyoFlg) || kankyo2Flg)
+                    if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
                     {
                         flag = false;
                     }
@@ -3857,7 +3851,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     kankyo2Flg = false;
                 }
 
-                if (!(bool)line1)
+                if (!line1)
                 {
                     line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
                     line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
@@ -3920,7 +3914,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     }
                 }
 
-                if ((bool)maidArray[this.selectMaidIndex].GetThumIcon())
+                if (maidArray[this.selectMaidIndex].GetThumIcon())
                 {
                     GUI.DrawTexture(new Rect(GetPix(30),
                                               GetPix(25),
@@ -4017,7 +4011,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     poseCombo.selectedItemIndex = poseGroupIndex <= 0
                                                           ? poseIndex[selectMaidIndex]
                                                           : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
-                    if (!isLock[selectMaidIndex] && (maid && maid.Visible))
+                    if (!isLock[selectMaidIndex] && maid && maid.Visible)
                     {
                         string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
                         isStop[selectMaidIndex] = false;
@@ -4072,7 +4066,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         }
                         else
                         {
-                            if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
+                            if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
                             {
                                 maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
                             }
@@ -4119,7 +4113,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     poseCombo.selectedItemIndex = poseGroupIndex <= 0
                                                           ? poseIndex[selectMaidIndex]
                                                           : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
-                    if (!isLock[selectMaidIndex] && (maid && maid.Visible))
+                    if (!isLock[selectMaidIndex] && maid && maid.Visible)
                     {
                         string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
                         isStop[selectMaidIndex] = false;
@@ -4174,7 +4168,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         }
                         else
                         {
-                            if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
+                            if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
                             {
                                 maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
                             }
@@ -4965,7 +4959,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     }
                     else
                     {
-                        if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
+                        if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
                         {
                             maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
                         }
@@ -5380,7 +5374,7 @@ namespace CM3D2.MultipleMaids.Plugin
                             }
                             else
                             {
-                                if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
+                                if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
                                 {
                                     maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
                                 }
@@ -5541,7 +5535,7 @@ namespace CM3D2.MultipleMaids.Plugin
                             }
                             else
                             {
-                                if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
+                                if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
                                 {
                                     maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
                                 }
@@ -5641,7 +5635,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     isCombo2 = false;
                     isPoseInit = true;
                     poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
-                    if (!isLock[selectMaidIndex] && (maid && maid.Visible))
+                    if (!isLock[selectMaidIndex] && maid && maid.Visible)
                     {
                         string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
                         isStop[selectMaidIndex] = false;
@@ -5696,7 +5690,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         }
                         else
                         {
-                            if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
+                            if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
                             {
                                 maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
                             }
@@ -5792,7 +5786,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         poseIndex[selectMaidIndex] = 0;
                     }
 
-                    if (!isLock[selectMaidIndex] && (maid && maid.Visible))
+                    if (!isLock[selectMaidIndex] && maid && maid.Visible)
                     {
                         string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
                         isStop[selectMaidIndex] = false;
@@ -5847,7 +5841,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         }
                         else
                         {
-                            if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
+                            if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
                             {
                                 maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
                             }
@@ -6108,7 +6102,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (!isF6)
                 {
                     bool flag = true;
-                    if (faceFlg || poseFlg || (sceneFlg || kankyoFlg) || kankyo2Flg)
+                    if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
                     {
                         flag = false;
                     }
@@ -6179,7 +6173,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     kankyo2Flg = false;
                 }
 
-                if (!(bool)line1)
+                if (!line1)
                 {
                     line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
                     line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
@@ -6240,7 +6234,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     }
                 }
 
-                if ((bool)maidArray[this.selectMaidIndex].GetThumIcon())
+                if (maidArray[this.selectMaidIndex].GetThumIcon())
                 {
                     GUI.DrawTexture(new Rect(GetPix(30),
                                               GetPix(25),
@@ -7662,7 +7656,7 @@ namespace CM3D2.MultipleMaids.Plugin
             GUI.enabled = !faceCombo.isClickedComboButton;
             yotogiFlg = false;
             if (sceneLevel != 14
-                || !(bool)
+                || !
 
                             GameObject
                                     .Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit")
@@ -7706,7 +7700,7 @@ namespace CM3D2.MultipleMaids.Plugin
             }
 
             bool flag1 = true;
-            if (faceFlg || poseFlg || (sceneFlg || kankyoFlg) || kankyo2Flg)
+            if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
             {
                 flag1 = false;
             }
@@ -7774,7 +7768,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 kankyo2Flg = false;
             }
 
-            if (!(bool)line1)
+            if (!line1)
             {
                 line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
                 line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
@@ -7824,7 +7818,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 copyIndex = 0;
                 for (int index = 0; index < maxMaidCnt; ++index)
                 {
-                    if (!isLock[index] && (maidArray[index] && maidArray[index].Visible))
+                    if (!isLock[index] && maidArray[index] && maidArray[index].Visible)
                     {
                         maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
                         maidArray[index].SetAutoTwistAll(true);
@@ -8014,7 +8008,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                      Texture2D.whiteTexture);
                 }
 
-                if ((bool)characterMgr.GetStockMaid(nStockNo).GetThumIcon())
+                if (characterMgr.GetStockMaid(nStockNo).GetThumIcon())
                 {
                     GUI.DrawTexture(new Rect(0.0f, y - 5f, pix, pix), characterMgr.GetStockMaid(nStockNo).GetThumIcon());
                 }
@@ -9093,7 +9087,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
             for (int index = 0; index < maxMaidCnt; ++index)
             {
-                if (!isLock[index] && (maidArray[index] != null && maidArray[index].Visible))
+                if (!isLock[index] && maidArray[index] != null && maidArray[index].Visible)
                 {
                     maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
                     maidArray[index].SetAutoTwistAll(true);

+ 2 - 2
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.IK.cs

@@ -485,7 +485,7 @@ namespace CM3D2.MultipleMaids.Plugin
         private void CopyIK(Maid maid, int i, Maid maid2, int i2)
         {
             poseIndex[i] = poseIndex[i2];
-            if (!(bool)maid || !maid.Visible)
+            if (!maid || !maid.Visible)
             {
                 return;
             }
@@ -544,7 +544,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 }
                 else
                 {
-                    if (!(bool)maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
+                    if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
                     {
                         maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
                     }

+ 8 - 8
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Init.cs

@@ -46,12 +46,12 @@ namespace CM3D2.MultipleMaids.Plugin
 
             for (int index1 = 0; index1 < maxMaidCnt; ++index1)
             {
-                if ((bool)maidArray[index1])
+                if (maidArray[index1])
                 {
                     maidArray[index1].StopKuchipakuPattern();
                 }
 
-                if ((bool)maidArray[index1])
+                if (maidArray[index1])
                 {
                     maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
                 }
@@ -66,7 +66,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     maidArray[index1].body0.jbMuneR.enabled = true;
                 }
 
-                if ((bool)maidArray[index1])
+                if (maidArray[index1])
                 {
                     maidArray[index1].boMabataki = true;
                     if (maidArray[index1].body0.isLoadedBody)
@@ -354,7 +354,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 muneIKR[index1] = false;
             }
 
-            if ((bool)kami)
+            if (kami)
             {
                 kami.SetActive(false);
             }
@@ -502,12 +502,12 @@ namespace CM3D2.MultipleMaids.Plugin
 
             for (int index1 = 0; index1 < maxMaidCnt; ++index1)
             {
-                if ((bool)maidArray[index1])
+                if (maidArray[index1])
                 {
                     maidArray[index1].StopKuchipakuPattern();
                 }
 
-                if ((bool)maidArray[index1])
+                if (maidArray[index1])
                 {
                     maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
                 }
@@ -522,7 +522,7 @@ namespace CM3D2.MultipleMaids.Plugin
                     maidArray[index1].body0.jbMuneR.enabled = true;
                 }
 
-                if ((bool)maidArray[index1])
+                if (maidArray[index1])
                 {
                     maidArray[index1].body0.SetMask(TBody.SlotID.wear, true);
                     maidArray[index1].body0.SetMask(TBody.SlotID.skirt, true);
@@ -857,7 +857,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 muneIKR[index1] = false;
             }
 
-            if ((bool)kami)
+            if (kami)
             {
                 kami.SetActive(false);
             }

+ 41 - 58
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.MaidUpdate.cs

@@ -382,16 +382,16 @@ namespace CM3D2.MultipleMaids.Plugin
                     isF7S = true;
                     isF7SInit = true;
                     bGui = false;
-                    base.Preferences["config"]["shift_f7"].Value = "true";
-                    base.SaveConfig();
+                    Preferences["config"]["shift_f7"].Value = "true";
+                    SaveConfig();
                     GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
                     bgmCombo.selectedItemIndex = 2;
                 }
                 else
                 {
                     isF7S = false;
-                    base.Preferences["config"]["shift_f7"].Value = "false";
-                    base.SaveConfig();
+                    Preferences["config"]["shift_f7"].Value = "false";
+                    SaveConfig();
                     if (!isF7)
                     {
                         init2();
@@ -442,8 +442,8 @@ namespace CM3D2.MultipleMaids.Plugin
                     comboBoxList[10] = new GUIContent("W");
                     listStyle.normal.textColor = Color.white;
                     listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
-                    listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
-                    listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
+                    listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
+                    listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
                     listStyle.fontSize = GetPix(13);
                     isYobidashi = true;
                     bGui = true;
@@ -531,8 +531,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 };
                 listStyle.normal.textColor = Color.white;
                 listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
-                listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
-                listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
+                listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
+                listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
                 listStyle.fontSize = GetPix(13);
                 try
                 {
@@ -593,8 +593,8 @@ namespace CM3D2.MultipleMaids.Plugin
                     comboBoxList[10] = new GUIContent("W");
                     listStyle.normal.textColor = Color.white;
                     listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
-                    listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
-                    listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
+                    listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
+                    listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
                     listStyle.fontSize = GetPix(13);
                     GameMain.Instance.BgMgr.ChangeBg("Theater");
                     if (!isVR)
@@ -826,7 +826,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
                                     if (depth_field_.dx11BokehTexture == null)
                                     {
-                                        depth_field_.dx11BokehTexture = (Resources.Load("Textures/hexShape") as Texture2D);
+                                        depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
                                     }
                                 }
 
@@ -7040,12 +7040,12 @@ namespace CM3D2.MultipleMaids.Plugin
                     kankyoFlg = false;
                     kankyo2Flg = false;
                     bGui = true;
-                    int i = 0;
-                    while (i < 10)
+
+                    for(int i = 0; i < 10; i++)
                     {
                         date[i] = "未保存";
                         ninzu[i] = "";
-                        IniKey iniKey = base.Preferences["scene"]["s" + (page * 10 + i + 1)];
+                        IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
                         if (iniKey.Value != null && iniKey.Value.ToString() != "")
                         {
                             string[] array4 = iniKey.Value.Split(new char[] { '_' });
@@ -7056,11 +7056,6 @@ namespace CM3D2.MultipleMaids.Plugin
                                 ninzu[i] = array5[1] + "人";
                             }
                         }
-
-                    IL_16A2F:
-                        i++;
-                        continue;
-                        goto IL_16A2F;
                     }
                 }
 
@@ -8826,8 +8821,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
                 if (isDanceChu)
                 {
-                    int j = 0;
-                    while (j < maidCnt)
+                    for(int j = 0; j < maidCnt; j++)
                     {
                         if (maidArray[j] && maidArray[j].Visible)
                         {
@@ -8858,11 +8852,6 @@ namespace CM3D2.MultipleMaids.Plugin
                                 }
                             }
                         }
-
-                    IL_1C205:
-                        j++;
-                        continue;
-                        goto IL_1C205;
                     }
                 }
 
@@ -10293,7 +10282,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                                              false);
                             }
 
-                            textAsset = (Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset);
+                            textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
                             text4 = textAsset.text;
                             text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
                             if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
@@ -10977,7 +10966,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                                              false);
                             }
 
-                            textAsset = (Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset);
+                            textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
                             text4 = textAsset.text;
                             text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
                             if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
@@ -11340,7 +11329,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                                              false);
                             }
 
-                            textAsset = (Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset);
+                            textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
                             text4 = textAsset.text;
                             text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
                             if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
@@ -11720,7 +11709,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                                              false);
                             }
 
-                            textAsset = (Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset);
+                            textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
                             text4 = textAsset.text;
                             text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
                             if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
@@ -12087,7 +12076,7 @@ namespace CM3D2.MultipleMaids.Plugin
                             case 11:
                             case 13:
                                 text5 = "dance_cm3d2_003_hs_f2.anm";
-                                textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
+                                textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
                                 break;
                         }
 
@@ -12444,19 +12433,19 @@ namespace CM3D2.MultipleMaids.Plugin
                             case 9:
                             case 13:
                                 text5 = "dance_cm3d2_003_hs_f2.anm";
-                                textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
+                                textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
                                 break;
                             case 2:
                             case 6:
                             case 10:
                                 text5 = "dance_cm3d2_003_hs_f3.anm";
-                                textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
+                                textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
                                 break;
                             case 3:
                             case 7:
                             case 11:
                                 text5 = "dance_cm3d2_003_hs_f4.anm";
-                                textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
+                                textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
                                 break;
                         }
 
@@ -12740,7 +12729,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                                              false);
                             }
 
-                            textAsset = (Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset);
+                            textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
                             text4 = textAsset.text;
                             text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
                             if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
@@ -13105,7 +13094,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                                              false);
                             }
 
-                            textAsset = (Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset);
+                            textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
                             text4 = textAsset.text;
                             text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
                             if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
@@ -13583,14 +13572,14 @@ namespace CM3D2.MultipleMaids.Plugin
                             case 10:
                             case 13:
                                 text5 = nameA + danceNo2 + ".anm";
-                                textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset);
+                                textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
                                 break;
                             case 2:
                             case 5:
                             case 8:
                             case 11:
                                 text5 = nameA + danceNo3 + ".anm";
-                                textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset);
+                                textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
                                 break;
                         }
 
@@ -14266,7 +14255,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                                              false);
                             }
 
-                            textAsset = (Resources.Load("SceneDance/dance_NmF_m1") as TextAsset);
+                            textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
                             string text5 = nameA + danceNo1 + ".anm";
                             switch (j)
                             {
@@ -14275,13 +14264,13 @@ namespace CM3D2.MultipleMaids.Plugin
                                 case 7:
                                 case 10:
                                 case 13:
-                                    textAsset = (Resources.Load("SceneDance/dance_NmF_m0") as TextAsset);
+                                    textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
                                     break;
                                 case 2:
                                 case 5:
                                 case 8:
                                 case 11:
-                                    textAsset = (Resources.Load("SceneDance/dance_NmF_m2") as TextAsset);
+                                    textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
                                     break;
                             }
 
@@ -14650,14 +14639,14 @@ namespace CM3D2.MultipleMaids.Plugin
                             case 10:
                             case 13:
                                 text5 = "dance_cm3d2_006_ssn_f2.anm";
-                                textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
+                                textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
                                 break;
                             case 2:
                             case 5:
                             case 8:
                             case 11:
                                 text5 = "dance_cm3d2_006_ssn_f3.anm";
-                                textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
+                                textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
                                 break;
                         }
 
@@ -14966,7 +14955,7 @@ namespace CM3D2.MultipleMaids.Plugin
                             case 11:
                             case 13:
                                 text5 = "dance_cmo_002_sd_f2.anm";
-                                textAsset = (Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset);
+                                textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
                                 break;
                         }
 
@@ -15443,7 +15432,7 @@ namespace CM3D2.MultipleMaids.Plugin
                             isShoes = true;
                         }
 
-                        TBody.MaskMode maskMode = (TBody.MaskMode)((int)Enum.Parse(typeof(TBody.MaskMode), text4));
+                        TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
                         for (int j = 0; j < maidCnt; j++)
                         {
                             if (maidArray[j] && maidArray[j].Visible)
@@ -17008,8 +16997,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         }
                     }
 
-                    i = 0;
-                    while (i < lightIndex.Count)
+                    for (i = 0;  i < lightIndex.Count; i++)
                     {
                         if (gLight[0] == null)
                         {
@@ -17141,7 +17129,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                         gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
                                         mLight[i].maid = lightList[i];
                                         mLight[i].maidArray = lightList.ToArray();
-                                        mLight[i].mArray = mLight.ToArray<MouseDrag6>();
+                                        mLight[i].mArray = mLight.ToArray();
                                         mLight[i].ido = 1;
                                     }
                                 }
@@ -17181,11 +17169,6 @@ namespace CM3D2.MultipleMaids.Plugin
                                 }
                             }
                         }
-
-                    IL_36227:
-                        i++;
-                        continue;
-                        goto IL_36227;
                     }
 
                     for (i = 0; i < doguBObject.Count; i++)
@@ -17293,7 +17276,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                     gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
                                     mDogu[i].maid = doguBObject[i];
                                     mDogu[i].maidArray = doguBObject.ToArray();
-                                    mDogu[i].mArray = mDogu.ToArray<MouseDrag6>();
+                                    mDogu[i].mArray = mDogu.ToArray();
                                     mDogu[i].ido = 1;
                                 }
                             }
@@ -17355,15 +17338,15 @@ namespace CM3D2.MultipleMaids.Plugin
                         if (!isVR2)
                         {
                             isVR2 = true;
-                            base.Preferences["config"]["shift_f8"].Value = "true";
-                            base.SaveConfig();
+                            Preferences["config"]["shift_f8"].Value = "true";
+                            SaveConfig();
                             GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
                         }
                         else
                         {
                             isVR2 = false;
-                            base.Preferences["config"]["shift_f8"].Value = "false";
-                            base.SaveConfig();
+                            Preferences["config"]["shift_f8"].Value = "false";
+                            SaveConfig();
                             GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
                         }
                     }

+ 66 - 66
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

@@ -151,16 +151,16 @@ namespace CM3D2.MultipleMaids.Plugin
                 }
             }
 
-            if (isVR && isVRScroll && (!getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
-                                                                            && (!Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z))
-                                                                            && (!Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
-                                                                                                         && (!Input.GetKey(KeyCode.Q)
-                                                                                                             && !Input.GetKey(KeyCode.R)))
-                                                                            && (!Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
-                                                                                                         && (!Input.GetKey(KeyCode.V)
-                                                                                                             && !Input.GetKey(KeyCode.C))
-                                                                                                         && !Input.GetKey(KeyCode.D))
-                                                                            && !Input.GetKey(KeyCode.S)))
+            if (isVR && isVRScroll && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
+                                                                            && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z)
+                                                                            && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
+                                                                                                         && !Input.GetKey(KeyCode.Q)
+                                                                                                             && !Input.GetKey(KeyCode.R)
+                                                                            && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
+                                                                                                         && !Input.GetKey(KeyCode.V)
+                                                                                                             && !Input.GetKey(KeyCode.C)
+                                                                                                         && !Input.GetKey(KeyCode.D)
+                                                                            && !Input.GetKey(KeyCode.S))
             {
                 Vector3 maid = GetFieldValue<OvrCamera, Vector3>(GameMain.Instance.OvrMgr.OvrCamera, "v")
                                + UTY.GetChildObject(mainCamera.gameObject, "TrackingSpace/CenterEyeAnchor", false).transform.rotation
@@ -272,9 +272,9 @@ namespace CM3D2.MultipleMaids.Plugin
                                     && (component.m_Damping != (double)kamiyure2
                                         || component.m_Elasticity != (double)kamiyure3
                                         || component.m_Radius != (double)kamiyure4)
-                                    && (index2 != 5 || (component.m_Damping != (double)kamiyure2
+                                    && (index2 != 5 || component.m_Damping != (double)kamiyure2
                                                         || component.m_Elasticity != kamiyure3 / 20.0
-                                                        || component.m_Radius != (double)kamiyure4)))
+                                                        || component.m_Radius != (double)kamiyure4))
                                 {
                                     component.m_Damping = kamiyure2;
                                     component.m_Elasticity = kamiyure3;
@@ -330,12 +330,12 @@ namespace CM3D2.MultipleMaids.Plugin
             }
 
             if ((!Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)
-                 || (Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3))
-                 || (Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5)
-                                                       || (Input.GetKeyDown(KeyCode.Keypad6) || Input.GetKeyDown(KeyCode.Keypad7)))
-                 || (Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
-                                                       || (Input.GetKeyDown(KeyCode.Keypad0) || Input.GetKeyDown(KeyCode.KeypadDivide))
-                                                       || Input.GetKeyDown(KeyCode.KeypadMultiply))
+                 || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
+                 || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5)
+                                                       || Input.GetKeyDown(KeyCode.Keypad6) || Input.GetKeyDown(KeyCode.Keypad7)
+                 || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
+                                                       || Input.GetKeyDown(KeyCode.Keypad0) || Input.GetKeyDown(KeyCode.KeypadDivide)
+                                                       || Input.GetKeyDown(KeyCode.KeypadMultiply)
                  || Input.GetKeyDown(KeyCode.KeypadMinus)) && (Input.GetKey(KeyCode.H) || isVR))
             {
                 if (Input.GetKeyDown(KeyCode.Keypad1))
@@ -620,7 +620,7 @@ namespace CM3D2.MultipleMaids.Plugin
                             isF6 = true;
                         }
 
-                        if (!(bool)maidArray[0])
+                        if (!maidArray[0])
                         {
                             maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
                         }
@@ -1072,42 +1072,42 @@ namespace CM3D2.MultipleMaids.Plugin
                     string withoutExtension = Path.GetFileNameWithoutExtension(path2);
                     string directoryName = Path.GetDirectoryName(path2);
                     if (!withoutExtension.StartsWith("maid_motion_") && !withoutExtension.StartsWith("work_00")
-                                                                     && (!withoutExtension.EndsWith("_3_")
-                                                                         && !withoutExtension.EndsWith("_5_"))
-                                                                     && (!withoutExtension.StartsWith("ck_")
+                                                                     && !withoutExtension.EndsWith("_3_")
+                                                                         && !withoutExtension.EndsWith("_5_")
+                                                                     && !withoutExtension.StartsWith("ck_")
                                                                          && !withoutExtension.StartsWith("vr_")
-                                                                         && (!withoutExtension.StartsWith("dance_mc")
-                                                                             && !withoutExtension.Contains("a01_")))
-                                                                     && (!withoutExtension.StartsWith("j_")
+                                                                         && !withoutExtension.StartsWith("dance_mc")
+                                                                             && !withoutExtension.Contains("a01_")
+                                                                     && !withoutExtension.StartsWith("j_")
                                                                          && !withoutExtension.StartsWith("k_")
-                                                                         && (!withoutExtension.StartsWith("t_")
-                                                                             && !withoutExtension.StartsWith("cbl_"))
-                                                                         && (!withoutExtension.Contains("b01_")
+                                                                         && !withoutExtension.StartsWith("t_")
+                                                                             && !withoutExtension.StartsWith("cbl_")
+                                                                         && !withoutExtension.Contains("b01_")
                                                                              && !withoutExtension.Contains("b02_")
-                                                                             && (!withoutExtension.Contains("_kubi_")
-                                                                                 && !withoutExtension.EndsWith("_m2"))))
-                                                                     && (!withoutExtension.EndsWith("_m3")
+                                                                             && !withoutExtension.Contains("_kubi_")
+                                                                                 && !withoutExtension.EndsWith("_m2")
+                                                                     && !withoutExtension.EndsWith("_m3")
                                                                          && !withoutExtension.Contains("_m2_once")
-                                                                         && (!withoutExtension.Contains("_m3_once")
-                                                                             && !withoutExtension.StartsWith("h_"))
-                                                                         && (!withoutExtension.StartsWith("event_")
+                                                                         && !withoutExtension.Contains("_m3_once")
+                                                                             && !withoutExtension.StartsWith("h_")
+                                                                         && !withoutExtension.StartsWith("event_")
                                                                              && !withoutExtension.StartsWith("man_")
-                                                                             && (!withoutExtension.EndsWith("_m")
-                                                                                 && !withoutExtension.Contains("_m_"))))
+                                                                             && !withoutExtension.EndsWith("_m")
+                                                                                 && !withoutExtension.Contains("_m_")
                                                                      && !withoutExtension.Contains("_man")
-                                                                     && (!(withoutExtension == "dance_cm3d2_001_zoukin")
+                                                                     && !(withoutExtension == "dance_cm3d2_001_zoukin")
                                                                          && !(withoutExtension == "dance_cm3d2_001_mop")
-                                                                         && (!(withoutExtension == "maid_motion")
-                                                                             && !(withoutExtension == "aruki_1_idougo_f"))
-                                                                         && (!(withoutExtension == "sleep2")
+                                                                         && !(withoutExtension == "maid_motion")
+                                                                             && !(withoutExtension == "aruki_1_idougo_f")
+                                                                         && !(withoutExtension == "sleep2")
                                                                              && !(withoutExtension == "stand_akire2")
-                                                                             && (!(withoutExtension == "ero_scene_001")
-                                                                                 && !(withoutExtension == "ero_scenefm_001")))
-                                                                         && (!(withoutExtension == "training_001")
+                                                                             && !(withoutExtension == "ero_scene_001")
+                                                                                 && !(withoutExtension == "ero_scenefm_001")
+                                                                         && !(withoutExtension == "training_001")
                                                                              && !(withoutExtension == "workff_001")
-                                                                             && (!(withoutExtension == "workfm_001")
-                                                                                 && !(withoutExtension == "dance_cm3d21_005_moe_mset")))
-                                                                         && !(withoutExtension == "hinpyoukai_001")))
+                                                                             && !(withoutExtension == "workfm_001")
+                                                                                 && !(withoutExtension == "dance_cm3d21_005_moe_mset")
+                                                                         && !(withoutExtension == "hinpyoukai_001"))
                     {
                         if (!directoryName.Contains("\\sex\\"))
                         {
@@ -3211,7 +3211,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         component.luminanceDependency = 0.494f;
                         component.blurDistance = 1.71f;
                         component.enabled = false;
-                        if ((bool)kami)
+                        if (kami)
                         {
                             kami.SetActive(false);
                         }
@@ -4789,7 +4789,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                     original1 = GameMain.Instance.BgMgr.CreateAssetBundle(str1.Split('#')[1]);
                                     if (original1 != null)
                                     {
-                                        original1 = Instantiate<GameObject>(original1);
+                                        original1 = Instantiate(original1);
                                         MeshRenderer[] componentsInChildren = original1.GetComponentsInChildren<MeshRenderer>();
                                         for (int index2 = 0; index2 < componentsInChildren.Length; ++index2)
                                         {
@@ -5807,7 +5807,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                     }
                                     else
                                     {
-                                        if (!(bool)maidArray[i]
+                                        if (!maidArray[i]
                                                               .body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
                                         {
                                             maidArray[i].body0.LoadAnime(strArray2[0] + ".anm",
@@ -5864,7 +5864,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
             if (allowUpdate || sceneLevel == 14 || sceneLevel == 24)
             {
-                if (isF6 && !(bool)cameraObj && !isVR)
+                if (isF6 && !cameraObj && !isVR)
                 {
                     cameraObj = new GameObject("subCamera");
                     subcamera = cameraObj.AddComponent<Camera>();
@@ -5904,8 +5904,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 if ((!isF6S || !getModKeyPressing(modKey.Shift) || !Input.GetKeyDown(KeyCode.F6))
                     && (isF6S || !getModKeyPressing(modKey.Shift) || !Input.GetKeyDown(KeyCode.F6)))
                 {
-                    if (!isF6 && Input.GetKeyDown(KeyCode.F6) && (sceneLevel != 5 && sceneLevel != 3)
-                        && (!isVR && maidArray[0]) && maidArray[0].Visible)
+                    if (!isF6 && Input.GetKeyDown(KeyCode.F6) && sceneLevel != 5 && sceneLevel != 3
+                        && !isVR && maidArray[0] && maidArray[0].Visible)
                     {
                         isF6 = true;
                         bGui = true;
@@ -5935,8 +5935,8 @@ namespace CM3D2.MultipleMaids.Plugin
                         lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
                         lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
                     }
-                    else if (!isF6 && Input.GetKeyDown(KeyCode.F7) && (sceneLevel != 5 && sceneLevel != 3)
-                             && (!isVR && maidArray[0]) && maidArray[0].Visible)
+                    else if (!isF6 && Input.GetKeyDown(KeyCode.F7) && sceneLevel != 5 && sceneLevel != 3
+                             && !isVR && maidArray[0] && maidArray[0].Visible)
                     {
                         isF6 = true;
                         bGui = true;
@@ -6098,7 +6098,7 @@ namespace CM3D2.MultipleMaids.Plugin
                             ninzu[index] = "";
                         }
 
-                        if ((bool)kami)
+                        if (kami)
                         {
                             kami.SetActive(false);
                         }
@@ -6236,8 +6236,8 @@ namespace CM3D2.MultipleMaids.Plugin
                 }
 
                 if (maidArray[selectMaidIndex] && maidArray[selectMaidIndex].Visible
-                                                                 && (!faceFlg && !poseFlg && (!sceneFlg && !kankyoFlg) && !kankyo2Flg
-                                                                     || (sceneFlg || kankyoFlg) || kankyo2Flg))
+                                                                 && (!faceFlg && !poseFlg && !sceneFlg && !kankyoFlg && !kankyo2Flg
+                                                                     || sceneFlg || kankyoFlg || kankyo2Flg))
                 {
                     for (int index = 0; index < maidCnt; ++index)
                     {
@@ -6263,11 +6263,11 @@ namespace CM3D2.MultipleMaids.Plugin
                             isPanz = maid.body0.GetMask(TBody.SlotID.panz);
                             isMaid = maid.body0.GetMask(TBody.SlotID.body);
                             isHeadset = maid.body0.GetMask(TBody.SlotID.headset) || maid.body0.GetMask(TBody.SlotID.accHat)
-                                                                                 || (maid.body0.GetMask(TBody.SlotID.accHead)
-                                                                                     || maid.body0.GetMask(TBody.SlotID.accKamiSubL))
-                                                                                 || (maid.body0.GetMask(TBody.SlotID.accKamiSubR)
+                                                                                 || maid.body0.GetMask(TBody.SlotID.accHead)
+                                                                                     || maid.body0.GetMask(TBody.SlotID.accKamiSubL)
+                                                                                 || maid.body0.GetMask(TBody.SlotID.accKamiSubR)
                                                                                      || maid.body0.GetMask(TBody.SlotID.accKami_1_)
-                                                                                     || maid.body0.GetMask(TBody.SlotID.accKami_2_))
+                                                                                     || maid.body0.GetMask(TBody.SlotID.accKami_2_)
                                                                                  || maid.body0.GetMask(TBody.SlotID.accKami_3_);
                             isAccUde = maid.body0.GetMask(TBody.SlotID.accUde);
                             isStkg = maid.body0.GetMask(TBody.SlotID.stkg);
@@ -6667,11 +6667,11 @@ namespace CM3D2.MultipleMaids.Plugin
                             isBra = maid.body0.GetMask(TBody.SlotID.bra);
                             isPanz = maid.body0.GetMask(TBody.SlotID.panz);
                             isHeadset = maid.body0.GetMask(TBody.SlotID.headset) || maid.body0.GetMask(TBody.SlotID.accHat)
-                                                                                 || (maid.body0.GetMask(TBody.SlotID.accHead)
-                                                                                     || maid.body0.GetMask(TBody.SlotID.accKamiSubL))
-                                                                                 || (maid.body0.GetMask(TBody.SlotID.accKamiSubR)
+                                                                                 || maid.body0.GetMask(TBody.SlotID.accHead)
+                                                                                     || maid.body0.GetMask(TBody.SlotID.accKamiSubL)
+                                                                                 || maid.body0.GetMask(TBody.SlotID.accKamiSubR)
                                                                                      || maid.body0.GetMask(TBody.SlotID.accKami_1_)
-                                                                                     || maid.body0.GetMask(TBody.SlotID.accKami_2_))
+                                                                                     || maid.body0.GetMask(TBody.SlotID.accKami_2_)
                                                                                  || maid.body0.GetMask(TBody.SlotID.accKami_3_);
                             isAccUde = maid.body0.GetMask(TBody.SlotID.accUde);
                             isStkg = maid.body0.GetMask(TBody.SlotID.stkg);
@@ -7472,7 +7472,7 @@ namespace CM3D2.MultipleMaids.Plugin
                                     gDogu[index].transform.eulerAngles = doguBObject[index].transform.eulerAngles;
                                     mDogu[index].maid = doguBObject[index];
                                     mDogu[index].maidArray = doguBObject.ToArray();
-                                    mDogu[index].mArray = ((IEnumerable<MouseDrag6>)mDogu).ToArray<MouseDrag6>();
+                                    mDogu[index].mArray = ((IEnumerable<MouseDrag6>)mDogu).ToArray();
                                     mDogu[index].ido = 1;
                                 }
                             }

+ 1 - 1
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.cs

@@ -5279,7 +5279,7 @@ namespace CM3D2.MultipleMaids.Plugin
         {
             sceneLevel = scene.buildIndex;
             maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
-            if (!(bool)bgObject)
+            if (!bgObject)
             {
                 bgObject = GameObject.Find("__GameMain__/BG");
                 bg = bgObject.transform;

+ 9 - 1
MultipleMaids/MouseDrag5.cs

@@ -10,11 +10,19 @@ public class MouseDrag5 : MonoBehaviour
 
     public void OnMouseDown()
     {
-        if (!(maid != null))
+        if (maid == null)
+        {
             return;
+        }
+
         if (ido == 1)
+        {
             isClick = true;
+        }
+
         if (ido == 2)
+        {
             isClick = true;
+        }
     }
 }

+ 8 - 8
MultipleMaids/Util/SimpleJSON.cs

@@ -372,7 +372,7 @@ namespace SimpleJSON
             }
             set
             {
-                Value = (value) ? "true" : "false";
+                Value = value ? "true" : "false";
             }
         }
 
@@ -709,7 +709,7 @@ namespace SimpleJSON
                                         string s = aJSON.Substring(i + 1, 4);
                                         Token.Append((char)int.Parse(
                                             s,
-                                            System.Globalization.NumberStyles.AllowHexSpecifier));
+                                            NumberStyles.AllowHexSpecifier));
                                         i += 4;
                                         break;
                                     }
@@ -1147,14 +1147,14 @@ namespace SimpleJSON
 
         internal override void WriteToStringBuilder(StringBuilder aSB, int aIndent, int aIndentInc, JSONTextMode aMode)
         {
-            aSB.Append((m_Data) ? "true" : "false");
+            aSB.Append(m_Data ? "true" : "false");
         }
         public override bool Equals(object obj)
         {
             if (obj == null)
                 return false;
             if (obj is bool)
-                return m_Data == (bool)obj;
+                return m_Data == (bool) obj;
             return false;
         }
         public override int GetHashCode()
@@ -1193,9 +1193,9 @@ namespace SimpleJSON
 
         public override bool Equals(object obj)
         {
-            if (object.ReferenceEquals(this, obj))
+            if (ReferenceEquals(this, obj))
                 return true;
-            return (obj is JSONNull);
+            return obj is JSONNull;
         }
         public override int GetHashCode()
         {
@@ -1264,7 +1264,7 @@ namespace SimpleJSON
         {
             if (b == null)
                 return true;
-            return System.Object.ReferenceEquals(a, b);
+            return ReferenceEquals(a, b);
         }
 
         public static bool operator !=(JSONLazyCreator a, object b)
@@ -1276,7 +1276,7 @@ namespace SimpleJSON
         {
             if (obj == null)
                 return true;
-            return System.Object.ReferenceEquals(this, obj);
+            return ReferenceEquals(this, obj);
         }
 
         public override int GetHashCode()