From 4a742feac18c62b6b05e8ad41bf8a8eb02135bdf Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:24:31 +0200 Subject: [PATCH] Make chat key configurable --- Fika.Core/Coop/Custom/FikaChat.cs | 2 +- Fika.Core/FikaPlugin.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Fika.Core/Coop/Custom/FikaChat.cs b/Fika.Core/Coop/Custom/FikaChat.cs index f1ca41aa..88f4f02c 100644 --- a/Fika.Core/Coop/Custom/FikaChat.cs +++ b/Fika.Core/Coop/Custom/FikaChat.cs @@ -35,7 +35,7 @@ protected void Awake() protected void Update() { - if (Input.GetKeyDown(KeyCode.Backspace)) + if (Input.GetKeyDown(FikaPlugin.ChatKey.Value.MainKey)) { ToggleVisibility(); } diff --git a/Fika.Core/FikaPlugin.cs b/Fika.Core/FikaPlugin.cs index 6f33c623..772106de 100644 --- a/Fika.Core/FikaPlugin.cs +++ b/Fika.Core/FikaPlugin.cs @@ -110,6 +110,7 @@ public class FikaPlugin : BaseUnityPlugin public static ConfigEntry FasterInventoryScroll { get; set; } public static ConfigEntry FasterInventoryScrollSpeed { get; set; } public static ConfigEntry ExtractKey { get; set; } + public static ConfigEntry ChatKey { get; set; } // Coop | Name Plates public static ConfigEntry UseNamePlates { get; set; } @@ -288,6 +289,8 @@ private void SetupConfig() ExtractKey = Config.Bind("Coop", "Extract Key", new KeyboardShortcut(KeyCode.F8), new ConfigDescription("The key used to extract from the raid.", tags: new ConfigurationManagerAttributes() { Order = 1 })); + ChatKey = Config.Bind("Coop", "Chat Key", new KeyboardShortcut(KeyCode.Backspace), new ConfigDescription("The key used to open the chat window.", tags: new ConfigurationManagerAttributes() { Order = 0 })); + // Coop | Name Plates UseNamePlates = Config.Bind("Coop | Name Plates", "Show Player Name Plates", false, new ConfigDescription("Toggle Health-Bars & Names.", tags: new ConfigurationManagerAttributes() { Order = 11 }));