Fix rubberbanding and refactor a little

This commit is contained in:
2025-03-31 12:09:21 +02:00
parent 79bfa72afd
commit d7ceb9a4d6
2 changed files with 84 additions and 39 deletions

View File

@@ -24,6 +24,7 @@ MyModGlobal = {
AOEPICKUP = Keys.Y,
QICK_FABRICATOR = Keys.K,
QICK_DECONSTRUCTOR = Keys.J,
QICK_MEDICAL_FABRICATOR = Keys.M,
NESTED_CONTAINERS = true,
DEBUG_MODE = true,
},
@@ -166,10 +167,15 @@ 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()
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()
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)