Browse Source

Remove double negation

denikson 5 years ago
parent
commit
926544e645

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

@@ -1162,7 +1162,7 @@ namespace CM3D2.MultipleMaids.Plugin
 
             foreach (ItemData itemData in itemDataList)
             {
-                if (slotIndex != 0 && !(itemData.info != slotArray[slotIndex]) && itemData.order > 0)
+                if (slotIndex != 0 && itemData.info == slotArray[slotIndex] && itemData.order > 0)
                 {
                     sortList.Add(new SortItem() { order = itemData.order, name = itemData.name, menu = itemData.menu, tex = itemData.tex });
                 }

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

@@ -3522,7 +3522,7 @@ namespace CM3D2.MultipleMaids.Plugin
                         for (int index = 0; index < 5; ++index)
                         {
                             original = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
-                            if (!(original != null))
+                            if (original == null)
                             {
                                 List<int> doguIndex;
                                 int doguSelectIndex;
@@ -5131,7 +5131,7 @@ namespace CM3D2.MultipleMaids.Plugin
                 if (loadPose[i] != "" && isLoadPose[i])
                 {
                     IniKey iniKey = Preferences["pose"][loadPose[i]];
-                    if (iniKey.Value == null || !(iniKey.Value.ToString() != "") || !(iniKey.Value.ToString() != "del"))
+                    if (iniKey.Value == null || iniKey.Value.ToString() == "" || iniKey.Value.ToString() == "del")
                     {
                         loadPose[i] = "";
                         isLoadPose[i] = false;
@@ -5682,7 +5682,7 @@ namespace CM3D2.MultipleMaids.Plugin
             if (loadScene > 0)
             {
                 IniKey iniKey = Preferences["scene"]["s" + loadScene];
-                if (iniKey.Value == null || !(iniKey.Value.ToString() != ""))
+                if (iniKey.Value == null || iniKey.Value.ToString() == "")
                 {
                     loadScene = 0;
                 }

+ 2 - 2
MultipleMaids/MouseDrag.cs

@@ -37,7 +37,7 @@ public class MouseDrag : MonoBehaviour
 
     public void OnMouseDown()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         IKCtrlData ikData = maid.body0.IKCtrl.GetIKData("左手", false);
         worldPoint = Camera.main.WorldToScreenPoint(transform.position);
@@ -102,7 +102,7 @@ public class MouseDrag : MonoBehaviour
 
     public void OnMouseDrag()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         if (isPlay && mouseIti != Input.mousePosition)
         {

+ 2 - 2
MultipleMaids/MouseDrag2.cs

@@ -27,7 +27,7 @@ public class MouseDrag2 : MonoBehaviour
 
     public void OnMouseDown()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         worldPoint = Camera.main.WorldToScreenPoint(transform.position);
         off = transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, worldPoint.z));
@@ -65,7 +65,7 @@ public class MouseDrag2 : MonoBehaviour
 
     public void OnMouseDrag()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         if (reset)
         {

+ 3 - 3
MultipleMaids/MouseDrag3.cs

@@ -47,7 +47,7 @@ public class MouseDrag3 : MonoBehaviour
 
     public void OnMouseDown()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         worldPoint = Camera.main.WorldToScreenPoint(transform.position);
         mouseIti = Input.mousePosition;
@@ -98,7 +98,7 @@ public class MouseDrag3 : MonoBehaviour
 
     public void OnMouseUp()
     {
-        if (!(maid != null) || doubleTapTime >= 0.300000011920929)
+        if (maid == null || doubleTapTime >= 0.300000011920929)
             return;
         if (ido == 7)
             isClick = true;
@@ -109,7 +109,7 @@ public class MouseDrag3 : MonoBehaviour
 
     public void OnMouseDrag()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         if (isPlay && mouseIti != Input.mousePosition)
         {

+ 2 - 2
MultipleMaids/MouseDrag4.cs

@@ -19,7 +19,7 @@ public class MouseDrag4 : MonoBehaviour
 
     public void OnMouseDown()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         worldPoint = Camera.main.WorldToScreenPoint(transform.position);
         off = transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, worldPoint.z));
@@ -33,7 +33,7 @@ public class MouseDrag4 : MonoBehaviour
 
     public void OnMouseDrag()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         if (reset)
         {

+ 3 - 3
MultipleMaids/MouseDrag6.cs

@@ -41,7 +41,7 @@ public class MouseDrag6 : MonoBehaviour
 
     public void OnMouseDown()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         worldPoint = Camera.main.WorldToScreenPoint(transform.position);
         off = transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, worldPoint.z));
@@ -80,7 +80,7 @@ public class MouseDrag6 : MonoBehaviour
 
     public void OnMouseUp()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         isOn = false;
         if (doubleTapTime < 0.300000011920929)
@@ -96,7 +96,7 @@ public class MouseDrag6 : MonoBehaviour
 
     public void OnMouseDrag()
     {
-        if (!(maid != null))
+        if (maid == null)
             return;
         if (reset)
         {