Skip to content

Commit

Permalink
Updated to support missing DLC personalities
Browse files Browse the repository at this point in the history
  • Loading branch information
DeathWeasel1337 authored Nov 8, 2018
1 parent 00e6342 commit 3ac6d52
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions KK_PersonalityCorrector/KK_PersonalityCorrector.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using BepInEx;
using BepInEx.Logging;
using Harmony;
using System.Collections.Generic;
/// <summary>
Expand All @@ -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");
Expand All @@ -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;
}
}
}
}
Expand Down

0 comments on commit 3ac6d52

Please sign in to comment.