From 243e1e83e822c2172b45b19746688a37c932f969 Mon Sep 17 00:00:00 2001 From: Imbus Date: Sun, 29 Oct 2023 11:15:45 +0100 Subject: [PATCH] Slight restructure and more cvars --- ImbusBinds.lua | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/ImbusBinds.lua b/ImbusBinds.lua index 898ea01..415e175 100755 --- a/ImbusBinds.lua +++ b/ImbusBinds.lua @@ -1,22 +1,3 @@ -local function unsetBinding(action) - local key1, key2 = GetBindingKey(action); - if key1 then - SetBinding(key1, nil); - end - if key2 then - SetBinding(key2, nil); - end -end - -local function setBindingRM(key, action) - unsetBinding(action); - if SetBinding(key, action) then - print("Set binding " .. key .. " to " .. action); - else - print("Failed to set binding " .. key .. " to " .. action); - end -end - -- https://wowpedia.fandom.com/wiki/BindingID local myBinds = { -- Movement @@ -102,6 +83,26 @@ local myBinds = { ["CTRL-6"] = "MULTIACTIONBAR4BUTTON12", } +local function unsetBinding(action) + local key1, key2 = GetBindingKey(action); + if key1 then + SetBinding(key1, nil); + end + if key2 then + SetBinding(key2, nil); + end +end + +local function setBindingRM(key, action) + unsetBinding(action); + if SetBinding(key, action) then + print("Set binding " .. key .. " to " .. action); + else + print("Failed to set binding " .. key .. " to " .. action); + end +end + + local function setAllBinds() for key, action in pairs(myBinds) do setBindingRM(key, action) @@ -119,6 +120,8 @@ local function enableBars() SetCVar("alwaysShowActionBars", 1); SetCVar("lockActionBars", 1); SetCVar("countdownForCooldowns", 1); + SetCVar("autoLootDefault", 1); + SetCVar("cameraDistanceMaxZoomFactor", 2); end local function BindsHandler(msg, editbox)