Fix rubberbanding and refactor a little
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user