Compare commits

..

2 Commits

Author SHA1 Message Date
42ba29dc9d Disable autoloot 2025-03-31 17:07:02 +02:00
40262e825c Update 2025-03-31 17:02:08 +02:00
4 changed files with 27 additions and 18 deletions

View File

@@ -150,10 +150,10 @@ Hook.Patch("Barotrauma.Character", "ControlLocalPlayer", function(instance, ptab
quickreload.tryReloadCursorItem(PlayerInput.IsShiftDown()) quickreload.tryReloadCursorItem(PlayerInput.IsShiftDown())
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.LOOT) then return end -- if not PlayerInput.KeyHit(MyModGlobal.CONFIG.LOOT) then return end
quickloot.tryLoot() -- quickloot.tryLoot()
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.SONAR) then return end

View File

@@ -51,7 +51,8 @@ local function clickRepairButton()
local button = repairableComponent.RepairButton local button = repairableComponent.RepairButton
if button then if button then
MyModGlobal.debugPrint("Clicking repair button") MyModGlobal.debugPrint("Clicking repair button")
button.OnClicked(button, repairableComponent) -- button.OnClicked(button, repairableComponent)
button.OnButtonDown()
end end
-- MyModGlobal.debugPrint("StartRepairing result: " .. tostring(result)) -- MyModGlobal.debugPrint("StartRepairing result: " .. tostring(result))

View File

@@ -1,20 +1,28 @@
-- Numbers indicate the maximum number of items that can be loaded -- Numbers indicate the maximum number of items that can be loaded
-- The limit is either the stack size (cramming in as many as fit) -- The limit is either the stack size (cramming in as many as fit)
-- Or this number -- Or this number
local harpoonGun = {
spear = 999,
batterycell = 1
}
local battery = { batterycell = 1 }
local oxygen = { oxygentank = 1 }
local LOAD_MAP = { local LOAD_MAP = {
plasmacutter = { oxygentank = 1 }, anechoicdivingsuit = oxygen,
weldingtool = { weldingfueltank = 1 }, autocpr = battery,
defibrillator = battery,
divingmask = oxygen,
divingsuit = oxygen,
flashlight = battery,
handheldsonar = battery,
harpooncoilrifle = harpoonGun,
harpoongun = harpoonGun,
plasmacutter = oxygen,
revolver = { revolverround = 999 }, revolver = { revolverround = 999 },
harpooncoilrifle = { underwaterscooter = battery,
spear = 999, weldingtool = { weldingfueltank = 1 },
batterycell = 1
},
anechoicdivingsuit = { oxygentank = 1, },
handheldsonar = { batterycell = 1 },
underwaterscooter = { batterycell = 1 },
divingsuit = { oxygentank = 1, },
flashlight = { batterycell = 1 },
divingmask = { oxygentank = 1, },
} }
return LOAD_MAP return LOAD_MAP

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<QuickInteractionsUI Absolute="[-12,-399,,]" Anchor="[0,1]" BackgroundColor="255,255,255,255" BackgroundSprite="{ Path: CUI.png, SourceRect: [128,32,32,32] }" FitContent="[True,True]" IgnoreEvents="true" OutlineColor="0,0,0,0" Relative="[-0.5,0,,]" ResizibleLeft="false" ResizibleRight="false" Visible="false"> <QuickInteractionsUI Absolute="[2,-457,,]" Anchor="[0,1]" BackgroundColor="255,255,255,255" BackgroundSprite="{ Path: CUI.png, SourceRect: [128,32,32,32] }" FitContent="[True,True]" IgnoreEvents="true" OutlineColor="0,0,0,0" Relative="[-0.5,0,,]" ResizibleLeft="false" ResizibleRight="false" Visible="false">
<CUIVerticalList AKA="layout" BottomGap="0" BreakSerialization="true" FitContent="[True,True]" IgnoreEvents="true" Relative="[0,0,1,1]" Scrollable="true" Visible="false" /> <CUIVerticalList AKA="layout" BottomGap="0" BreakSerialization="true" FitContent="[True,True]" IgnoreEvents="true" Relative="[0,0,1,1]" Scrollable="true" Visible="false" />
</QuickInteractionsUI> </QuickInteractionsUI>