From 7a7889a3b39412e086139238f85312d66f8db427 Mon Sep 17 00:00:00 2001 From: DeathWeasel1337 Date: Wed, 20 Feb 2019 13:57:37 -0600 Subject: [PATCH] Fix hotkeys, configs --- KK_FreeHRandom/KK_FreeHRandom.cs | 6 +++--- KK_HairAccessoryFix/KK_HairAccessoryFix.cs | 6 +++++- KK_HairAccessoryFix/KK_HairAccessoryFix.csproj | 3 +++ KK_HairAccessoryFix/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/KK_FreeHRandom/KK_FreeHRandom.cs b/KK_FreeHRandom/KK_FreeHRandom.cs index 3b48fd4a..27e0e707 100644 --- a/KK_FreeHRandom/KK_FreeHRandom.cs +++ b/KK_FreeHRandom/KK_FreeHRandom.cs @@ -30,8 +30,8 @@ public class KK_FreeHRandom : BaseUnityPlugin void Main() { - RandomMale = new ConfigWrapper("EnableTraps", PluginNameInternal, true); - RandomHotkey = new SavedKeyboardShortcut("InvisibilityHotkey", PluginNameInternal, new KeyboardShortcut(KeyCode.F5)); + RandomMale = new ConfigWrapper("RandomMale", PluginNameInternal, true); + RandomHotkey = new SavedKeyboardShortcut("RandomHotkey", PluginNameInternal, new KeyboardShortcut(KeyCode.F5)); } void Update() @@ -40,7 +40,7 @@ void Update() { if (Singleton.Instance.NowSceneNames.Any(sceneName => sceneName == "FreeH")) { - if (Input.GetKeyDown(KeyCode.F5)) + if (RandomHotkey.IsDown()) { //Get some random female cards FreeHScene instance = Singleton.Instance; diff --git a/KK_HairAccessoryFix/KK_HairAccessoryFix.cs b/KK_HairAccessoryFix/KK_HairAccessoryFix.cs index b97a7dc8..337ff8e7 100644 --- a/KK_HairAccessoryFix/KK_HairAccessoryFix.cs +++ b/KK_HairAccessoryFix/KK_HairAccessoryFix.cs @@ -28,6 +28,9 @@ public class KK_HairAccessoryFix : BaseUnityPlugin [Category("Config")] [Description("Match hair accessory gloss when possible.")] public static ConfigWrapper 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() { @@ -37,11 +40,12 @@ void Main() MatchColor = new ConfigWrapper("MatchColor", PluginNameInternal, true); MatchOutlineColor = new ConfigWrapper("MatchOutlineColor", PluginNameInternal, true); MatchGloss = new ConfigWrapper("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()); } diff --git a/KK_HairAccessoryFix/KK_HairAccessoryFix.csproj b/KK_HairAccessoryFix/KK_HairAccessoryFix.csproj index c3e7f564..daa366d7 100644 --- a/KK_HairAccessoryFix/KK_HairAccessoryFix.csproj +++ b/KK_HairAccessoryFix/KK_HairAccessoryFix.csproj @@ -40,6 +40,9 @@ ..\lib\BepInEx.dll + + ..\..\..\..\..\..\Illusion\Koikatu\BepInEx\ConfigurationManager.dll + ..\lib\KKAPI.dll diff --git a/KK_HairAccessoryFix/Properties/AssemblyInfo.cs b/KK_HairAccessoryFix/Properties/AssemblyInfo.cs index 15a74a37..f2c2aa88 100644 --- a/KK_HairAccessoryFix/Properties/AssemblyInfo.cs +++ b/KK_HairAccessoryFix/Properties/AssemblyInfo.cs @@ -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)]