diff --git a/KK_PersonalityCorrector/KK_PersonalityCorrector.cs b/KK_PersonalityCorrector/KK_PersonalityCorrector.cs index 28622d9d..f1837113 100644 --- a/KK_PersonalityCorrector/KK_PersonalityCorrector.cs +++ b/KK_PersonalityCorrector/KK_PersonalityCorrector.cs @@ -1,5 +1,4 @@ using BepInEx; -using BepInEx.Logging; using Harmony; using System.Collections.Generic; /// @@ -10,6 +9,8 @@ namespace KK_PersonalityCorrector [BepInPlugin("com.deathweasel.bepinex.personalitycorrector", "Personality Corrector", "1.0")] public class KK_PersonalityCorrector : BaseUnityPlugin { + public static int DefaultPersonality = 8; //Pure + void Main() { var harmony = HarmonyInstance.Create("com.deathweasel.bepinex.personalitycorrector"); @@ -24,14 +25,34 @@ public static void InitializeList(ActionGame.ClassRoomCharaFile __instance) foreach (var x in chaFileDic) { - if (x.Value.parameter.personality == 80 || - x.Value.parameter.personality == 81 || - x.Value.parameter.personality == 82 || - x.Value.parameter.personality == 83 || - x.Value.parameter.personality == 84 || - x.Value.parameter.personality == 85 || - x.Value.parameter.personality == 86) - x.Value.parameter.personality = 8; //Pure + switch (x.Value.parameter.personality) + { + case 30: + if (!AssetBundleCheck.IsFile("etcetra/list/config/14.unity3d")) + x.Value.parameter.personality = DefaultPersonality; + break; + case 31: + if (!AssetBundleCheck.IsFile("etcetra/list/config/15.unity3d")) + x.Value.parameter.personality = DefaultPersonality; + break; + case 32: + if (!AssetBundleCheck.IsFile("etcetra/list/config/16.unity3d")) + x.Value.parameter.personality = DefaultPersonality; + break; + case 33: + if (!AssetBundleCheck.IsFile("etcetra/list/config/17.unity3d")) + x.Value.parameter.personality = DefaultPersonality; + break; + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + x.Value.parameter.personality = DefaultPersonality; + break; + } } } }