Skip to content

Commit

Permalink
Fix hotkeys, configs
Browse files Browse the repository at this point in the history
  • Loading branch information
DeathWeasel1337 committed Feb 20, 2019
1 parent 8b3338a commit 7a7889a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions KK_FreeHRandom/KK_FreeHRandom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public class KK_FreeHRandom : BaseUnityPlugin

void Main()
{
RandomMale = new ConfigWrapper<bool>("EnableTraps", PluginNameInternal, true);
RandomHotkey = new SavedKeyboardShortcut("InvisibilityHotkey", PluginNameInternal, new KeyboardShortcut(KeyCode.F5));
RandomMale = new ConfigWrapper<bool>("RandomMale", PluginNameInternal, true);
RandomHotkey = new SavedKeyboardShortcut("RandomHotkey", PluginNameInternal, new KeyboardShortcut(KeyCode.F5));
}

void Update()
Expand All @@ -40,7 +40,7 @@ void Update()
{
if (Singleton<Manager.Scene>.Instance.NowSceneNames.Any(sceneName => sceneName == "FreeH"))
{
if (Input.GetKeyDown(KeyCode.F5))
if (RandomHotkey.IsDown())
{
//Get some random female cards
FreeHScene instance = Singleton<FreeHScene>.Instance;
Expand Down
6 changes: 5 additions & 1 deletion KK_HairAccessoryFix/KK_HairAccessoryFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class KK_HairAccessoryFix : BaseUnityPlugin
[Category("Config")]
[Description("Match hair accessory gloss when possible.")]
public static ConfigWrapper<bool> MatchGloss { get; private set; }
[DisplayName("Sync Hotkey")]
[Description("Syncs newly added hair accessories in the character maker.")]
public static SavedKeyboardShortcut SyncHotkey { get; private set; }

void Main()
{
Expand All @@ -37,11 +40,12 @@ void Main()
MatchColor = new ConfigWrapper<bool>("MatchColor", PluginNameInternal, true);
MatchOutlineColor = new ConfigWrapper<bool>("MatchOutlineColor", PluginNameInternal, true);
MatchGloss = new ConfigWrapper<bool>("MatchGloss", PluginNameInternal, true);
SyncHotkey = new SavedKeyboardShortcut("SyncHotkey", PluginNameInternal, new KeyboardShortcut(KeyCode.F5));
}

void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha5) && MakerAPI.InsideAndLoaded)
if (SyncHotkey.IsDown() && MakerAPI.InsideAndLoaded)
FixHairAccessories(MakerAPI.GetCharacterControl());
}

Expand Down
3 changes: 3 additions & 0 deletions KK_HairAccessoryFix/KK_HairAccessoryFix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.dll</HintPath>
</Reference>
<Reference Include="ConfigurationManager">
<HintPath>..\..\..\..\..\..\Illusion\Koikatu\BepInEx\ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="KKAPI">
<HintPath>..\lib\KKAPI.dll</HintPath>
</Reference>
Expand Down
4 changes: 2 additions & 2 deletions KK_HairAccessoryFix/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion(KK_HairAccessoryFix.KK_HairAccessoryFix.Version)]
[assembly: AssemblyFileVersion(KK_HairAccessoryFix.KK_HairAccessoryFix.Version)]

0 comments on commit 7a7889a

Please sign in to comment.