Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jalil49 committed May 9, 2021
1 parent 909e76f commit c10fcd0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Accessory States/Maker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ private IEnumerator WaitForSlots()

while (ACC_Appearance_state.Control.ControlObjects.Count() < ACCData)
{
yield return 0;
yield return null;
}
foreach (var item in ThisCharactersData.Now_ACC_State_array)
{
Expand Down
19 changes: 18 additions & 1 deletion Accessory States/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using BepInEx.Logging;
using KKAPI.Chara;
using KKAPI.MainGame;
using System;

namespace Accessory_States
{
Expand All @@ -22,9 +23,25 @@ public void Awake()
Logger = base.Logger;
Hooks.Init();
CharacterApi.RegisterExtraBehaviour<CharaEvent>(GUID);
CharacterApi.RegisterExtraBehaviour<Dummy>("madevil.kk.ass");
if (!TryfindPluginInstance("madevil.kk.ass"))
{
CharacterApi.RegisterExtraBehaviour<Dummy>("madevil.kk.ass");
}
GameAPI.RegisterExtraBehaviour<GameEvent>(GUID);
NamingID = Config.Bind("Grouping ID", "Grouping ID", "2", "Requires restarting maker");
}

private bool TryfindPluginInstance(string pluginName, Version minimumVersion = null)
{
BepInEx.Bootstrap.Chainloader.PluginInfos.TryGetValue(pluginName, out PluginInfo target);
if (null != target)
{
if (target.Metadata.Version >= minimumVersion)
{
return true;
}
}
return false;
}
}
}

0 comments on commit c10fcd0

Please sign in to comment.