Skip to content

Commit

Permalink
Fixed sliderunlocker running outside of maker
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Oct 2, 2020
1 parent b46680b commit 16a5365
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Core_SliderUnlocker/Core.SliderUnlocker.Hooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ public static bool CheckDataRangePreHook(ref bool __result)
}

[HarmonyPrefix, HarmonyPatch(typeof(ChaControl), nameof(ChaControl.Reload))]
public static void Reload(ChaControl __instance) => __instance.StartCoroutine(SliderUnlocker.ResetAllSliders());
public static void Reload(ChaControl __instance)
{
if (CustomBase.IsInstance())
__instance.StartCoroutine(SliderUnlocker.ResetAllSliders());
}
#endif

#if KK // Prevent slider values from getting clamped to 0.2 - 0.8 range in school mode
Expand Down
4 changes: 4 additions & 0 deletions src/EC_SliderUnlocker/EC_SliderUnlocker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
<HintPath>..\..\packages\IllusionLibs.BepInEx.Harmony.2.0.0-beta2\lib\net35\BepInEx.Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="IL, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\IllusionLibs.EmotionCreators.IL.2019.6.6\lib\net46\IL.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand Down
1 change: 1 addition & 0 deletions src/EC_SliderUnlocker/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<package id="IllusionLibs.BepInEx" version="5.0.1.1" targetFramework="net46" developmentDependency="true" />
<package id="IllusionLibs.BepInEx.Harmony" version="2.0.0-beta2" targetFramework="net46" developmentDependency="true" />
<package id="IllusionLibs.EmotionCreators.Assembly-CSharp" version="2019.6.6" targetFramework="net46" developmentDependency="true" />
<package id="IllusionLibs.EmotionCreators.IL" version="2019.6.6" targetFramework="net46" developmentDependency="true" />
<package id="IllusionLibs.EmotionCreators.TextMeshPro" version="2019.6.6" targetFramework="net46" developmentDependency="true" />
<package id="IllusionLibs.EmotionCreators.UnityEngine.CoreModule" version="2017.4.24.1" targetFramework="net46" developmentDependency="true" />
<package id="IllusionLibs.EmotionCreators.UnityEngine.IMGUIModule" version="2017.4.24.1" targetFramework="net46" developmentDependency="true" />
Expand Down

0 comments on commit 16a5365

Please sign in to comment.