Disable all keybinds
This commit is contained in:
@@ -96,88 +96,88 @@ else
|
|||||||
LuaUserData.RegisterType("Barotrauma.Items.Components.Repairable")
|
LuaUserData.RegisterType("Barotrauma.Items.Components.Repairable")
|
||||||
LuaUserData.RegisterType("Barotrauma.VisualSlot")
|
LuaUserData.RegisterType("Barotrauma.VisualSlot")
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QUICKSTACK_KEYS) then return end
|
|
||||||
quickstack.quickStackItems(instance)
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.STACK_TO_CURSOR) then return end
|
|
||||||
if not PlayerInput.IsShiftDown() then
|
|
||||||
quickstack.stackToCursor()
|
|
||||||
else
|
|
||||||
quickstack.stackAllToCursor()
|
|
||||||
end
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.FABRICATOR_KEY) then return end
|
|
||||||
fabricatorstack.tryStackFabricator(instance)
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.FIX) then return end
|
|
||||||
hotkeyrepair.tryRepair()
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.MAX_BUY) then return end
|
|
||||||
quickbuy.tryBuy()
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
local throttle = 0.1
|
|
||||||
local throttleTimer = 0
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if PlayerInput.Mouse4ButtonClicked() then
|
|
||||||
cursormacroer.setTargetInventory()
|
|
||||||
end
|
|
||||||
if not PlayerInput.IsAltDown() then return end
|
|
||||||
if Timer.GetTime() < throttleTimer then return end
|
|
||||||
throttleTimer = Timer.GetTime() + throttle
|
|
||||||
-- We can not use shift because holding shift means we're moving half a stack
|
|
||||||
-- Fuck me sideways
|
|
||||||
-- if not PlayerInput.IsShiftDown() then return end
|
|
||||||
-- if not PlayerInput.PrimaryMouseButtonClicked() then return end
|
|
||||||
cursormacroer.tryStackCursorItem()
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.UNLOAD) then return end
|
|
||||||
quickunload.tryUnloadCursorItem()
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.RELOAD) then return end
|
|
||||||
quickreload.tryReloadCursorItem(PlayerInput.IsShiftDown())
|
|
||||||
end, Hook.HookMethodType.After)
|
|
||||||
|
|
||||||
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.LOOT) then return end
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QUICKSTACK_KEYS) then return end
|
||||||
-- quickloot.tryLoot()
|
-- quickstack.quickStackItems(instance)
|
||||||
-- end, Hook.HookMethodType.After)
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.SONAR) then return end
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.STACK_TO_CURSOR) then return end
|
||||||
sonarpinger.tryPing()
|
-- if not PlayerInput.IsShiftDown() then
|
||||||
end, Hook.HookMethodType.After)
|
-- quickstack.stackToCursor()
|
||||||
|
-- else
|
||||||
|
-- quickstack.stackAllToCursor()
|
||||||
|
-- end
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.AOEPICKUP) then return end
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.FABRICATOR_KEY) then return end
|
||||||
aoepickup.tryAoePickup()
|
-- fabricatorstack.tryStackFabricator(instance)
|
||||||
end, Hook.HookMethodType.After)
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QICK_FABRICATOR) then return end
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.FIX) then return end
|
||||||
quickaccess.tryAccessFabricator(PlayerInput.IsShiftDown())
|
-- hotkeyrepair.tryRepair()
|
||||||
end, Hook.HookMethodType.After)
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QICK_DECONSTRUCTOR) then return end
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.MAX_BUY) then return end
|
||||||
quickaccess.tryAccessDeconstructor(PlayerInput.IsShiftDown())
|
-- quickbuy.tryBuy()
|
||||||
end, Hook.HookMethodType.After)
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
-- local throttle = 0.1
|
||||||
if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QICK_MEDICAL_FABRICATOR) then return end
|
-- local throttleTimer = 0
|
||||||
quickaccess.tryAccessMedicalFabricator(PlayerInput.IsShiftDown())
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
end, Hook.HookMethodType.After)
|
-- if PlayerInput.Mouse4ButtonClicked() then
|
||||||
|
-- cursormacroer.setTargetInventory()
|
||||||
|
-- end
|
||||||
|
-- if not PlayerInput.IsAltDown() then return end
|
||||||
|
-- if Timer.GetTime() < throttleTimer then return end
|
||||||
|
-- throttleTimer = Timer.GetTime() + throttle
|
||||||
|
-- -- We can not use shift because holding shift means we're moving half a stack
|
||||||
|
-- -- Fuck me sideways
|
||||||
|
-- -- if not PlayerInput.IsShiftDown() then return end
|
||||||
|
-- -- if not PlayerInput.PrimaryMouseButtonClicked() then return end
|
||||||
|
-- cursormacroer.tryStackCursorItem()
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.UNLOAD) then return end
|
||||||
|
-- quickunload.tryUnloadCursorItem()
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.RELOAD) then return end
|
||||||
|
-- quickreload.tryReloadCursorItem(PlayerInput.IsShiftDown())
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- -- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- -- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.LOOT) then return end
|
||||||
|
-- -- quickloot.tryLoot()
|
||||||
|
-- -- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.SONAR) then return end
|
||||||
|
-- sonarpinger.tryPing()
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.AOEPICKUP) then return end
|
||||||
|
-- aoepickup.tryAoePickup()
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QICK_FABRICATOR) then return end
|
||||||
|
-- quickaccess.tryAccessFabricator(PlayerInput.IsShiftDown())
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QICK_DECONSTRUCTOR) then return end
|
||||||
|
-- quickaccess.tryAccessDeconstructor(PlayerInput.IsShiftDown())
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
|
|
||||||
|
-- Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptable)
|
||||||
|
-- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.QICK_MEDICAL_FABRICATOR) then return end
|
||||||
|
-- quickaccess.tryAccessMedicalFabricator(PlayerInput.IsShiftDown())
|
||||||
|
-- end, Hook.HookMethodType.After)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user