From 4bda49d89ee354ba1bf7fd9b7fa05e30e7a3aaa3 Mon Sep 17 00:00:00 2001
From: w1n7er87 <alexn78due@gmail.com>
Date: Wed, 29 Nov 2023 18:23:30 +0100
Subject: [PATCH] addressing issues

---
 Unity/Assets/Scripts/SCHIZO/Utilities/T2DArray.cs    |  8 +-------
 .../ARG Censor => Scripts/SCHIZO/VFX}/ARGCensor.cs   |  0
 .../SCHIZO/VFX}/ARGCensor.cs.meta                    |  0
 Unity/Assets/Scripts/SCHIZO/VFX/MatPassID.cs         | 12 ++++--------
 4 files changed, 5 insertions(+), 15 deletions(-)
 rename Unity/Assets/{Mod/VFX/ARG Censor => Scripts/SCHIZO/VFX}/ARGCensor.cs (100%)
 rename Unity/Assets/{Mod/VFX/ARG Censor => Scripts/SCHIZO/VFX}/ARGCensor.cs.meta (100%)

diff --git a/Unity/Assets/Scripts/SCHIZO/Utilities/T2DArray.cs b/Unity/Assets/Scripts/SCHIZO/Utilities/T2DArray.cs
index 698bffb8..a019ed61 100644
--- a/Unity/Assets/Scripts/SCHIZO/Utilities/T2DArray.cs
+++ b/Unity/Assets/Scripts/SCHIZO/Utilities/T2DArray.cs
@@ -17,7 +17,7 @@ public class T2DArray : ScriptableObject
 
         private void OnValidate()
         {
-            if (textures.Count > 1 ) ClearEmpty(textures);
+            if (textures.Count > 1 ) textures.RemoveAll(o => o == null);
             tooFewTextures = textures.Count < 2;
 
             if (textures.Count > 1 && textures[0] != null)
@@ -37,12 +37,6 @@ private void OnValidate()
             }
         }
 
-        private List<T> ClearEmpty<T>(List<T> list)
-        {
-            list.RemoveAll(o => o.GetType() == typeof(T));
-            return list;
-        }
-
         public Texture2DArray PopulateTexture2DArray()
         {
             List<Texture> tt = textures;
diff --git a/Unity/Assets/Mod/VFX/ARG Censor/ARGCensor.cs b/Unity/Assets/Scripts/SCHIZO/VFX/ARGCensor.cs
similarity index 100%
rename from Unity/Assets/Mod/VFX/ARG Censor/ARGCensor.cs
rename to Unity/Assets/Scripts/SCHIZO/VFX/ARGCensor.cs
diff --git a/Unity/Assets/Mod/VFX/ARG Censor/ARGCensor.cs.meta b/Unity/Assets/Scripts/SCHIZO/VFX/ARGCensor.cs.meta
similarity index 100%
rename from Unity/Assets/Mod/VFX/ARG Censor/ARGCensor.cs.meta
rename to Unity/Assets/Scripts/SCHIZO/VFX/ARGCensor.cs.meta
diff --git a/Unity/Assets/Scripts/SCHIZO/VFX/MatPassID.cs b/Unity/Assets/Scripts/SCHIZO/VFX/MatPassID.cs
index 8fd64a21..755c0e86 100644
--- a/Unity/Assets/Scripts/SCHIZO/VFX/MatPassID.cs
+++ b/Unity/Assets/Scripts/SCHIZO/VFX/MatPassID.cs
@@ -34,8 +34,7 @@ public void SetVector(string name, Vector4 value)
         int id = Shader.PropertyToID(name);
 
         vectors ??= [];
-        if (vectors.ContainsKey(id)) { vectors[id] = value; }
-        else { vectors.Add(id, value); }
+        vectors[id] = value;
     }
 
     private Dictionary<int, float> floats;
@@ -44,8 +43,7 @@ public void SetFloat(string name, float value)
         int id = Shader.PropertyToID(name);
 
         floats ??= [];
-        if (floats.ContainsKey(id)) { floats[id] = value; }
-        else{ floats.Add(id, value); }
+        floats[id] = value;
     }
 
     private Dictionary<int, Color> colors;
@@ -54,8 +52,7 @@ public void SetColor(string name, Color value)
         int id = Shader.PropertyToID(name);
 
         colors ??= [];
-        if (colors.ContainsKey(id)) { colors[id] = value; }
-        else { colors.Add(id, value); }
+        colors[id] = value;
     }
 
     private Dictionary<int, Texture> textures;
@@ -64,8 +61,7 @@ public void SetTexture(string name, Texture value)
         int id = Shader.PropertyToID(name);
 
         textures ??= [];
-        if (textures.ContainsKey(id)) { textures[id] = value; }
-        else { textures.Add(id, value); }
+        textures[id] = value;
     }
 
     public Material ApplyProperties(out int ID)