fix: disabled ISDetachItemHotbar override, broken and unneccesary

This commit is contained in:
ZioPao
2025-04-17 12:52:23 +02:00
parent 80e9391db5
commit 69025c8262

View File

@@ -29,12 +29,12 @@ function ISAttachItemHotbar:new(character, item, slot, slotIndex, slotDef)
return action
end
local og_ISDetachItemHotbar_new = ISDetachItemHotbar.new
function ISDetachItemHotbar:new(character, item)
local action = og_ISDetachItemHotbar_new(self, character, item)
action = OverrideAction(action, -1)
return action
end
-- local og_ISDetachItemHotbar_new = ISDetachItemHotbar.new
-- function ISDetachItemHotbar:new(character, item)
-- local action = og_ISDetachItemHotbar_new(self, character, item)
-- --action = OverrideAction(action, -1)
-- return action
-- end
local og_ISEquipWeaponAction_new = ISEquipWeaponAction.new
@@ -63,7 +63,7 @@ function ISUnequipAction:new(character, item, time)
local action = og_ISUnequipAction_new(self, character, item, time)
---@cast item InventoryItem
-- For some reason (I have no clue why), if we re-run the method it breaks basically every unequip clothing action. Not for weapons though.
-- TODO Consider other cases where unequipping something should skip TOC.
if instanceof(item, 'HandWeapon') then
OverrideAction(action, time)
end