From 1b248d744e6975b7c4ae797c0e1e1eacf1c2eedc Mon Sep 17 00:00:00 2001 From: ZioPao Date: Thu, 16 Nov 2023 20:04:32 +0100 Subject: [PATCH] Little fixes --- media/lua/client/TOC/Handlers/ProsthesisHandler.lua | 6 ++++-- media/scripts/TOC_prosthesis_items.txt | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/media/lua/client/TOC/Handlers/ProsthesisHandler.lua b/media/lua/client/TOC/Handlers/ProsthesisHandler.lua index 345a15c..501fad1 100644 --- a/media/lua/client/TOC/Handlers/ProsthesisHandler.lua +++ b/media/lua/client/TOC/Handlers/ProsthesisHandler.lua @@ -10,10 +10,11 @@ local ProsthesisHandler = {} local bodyLocArmProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_ArmProst ---Check if the following item is a prosthesis or not ----@param item InventoryItem +---@param item InventoryItem? ---@return boolean function ProsthesisHandler.CheckIfProst(item) -- TODO Won't be correct when prost for legs are gonna be in + if item == nil then return false end return item:getBodyLocation():contains(bodyLocArmProst) end @@ -87,6 +88,7 @@ end ------------------------- --* Overrides *-- + ---@diagnostic disable-next-line: duplicate-set-field local og_ISWearClothing_isValid = ISWearClothing.isValid function ISWearClothing:isValid() @@ -106,8 +108,8 @@ end local og_ISWearClothing_perform = ISWearClothing.perform function ISWearClothing:perform() - og_ISWearClothing_perform(self) ProsthesisHandler.SearchAndSetupProsthesis(self.item, true) + og_ISWearClothing_perform(self) end local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid diff --git a/media/scripts/TOC_prosthesis_items.txt b/media/scripts/TOC_prosthesis_items.txt index 16a5c44..5709746 100644 --- a/media/scripts/TOC_prosthesis_items.txt +++ b/media/scripts/TOC_prosthesis_items.txt @@ -18,7 +18,7 @@ module TOC clothingExtraSubmenu = InstallProstLeft, BodyLocation = TOC_ArmProst_L, Weight = 1.5, - CombatSpeedModifier = 1.1, + CombatSpeedModifier = 1.05, BloodLocation = UpperArms;UpperBody, Insulation = 1.0, WindResistance = 1.0, @@ -37,7 +37,7 @@ module TOC clothingExtraSubmenu = InstallProstRight, BodyLocation = TOC_ArmProst_R, Weight = 1.5, - CombatSpeedModifier = 1.1, + CombatSpeedModifier = 1.05, BloodLocation = UpperArms;UpperBody, Insulation = 1.0, WindResistance = 1.0, @@ -57,7 +57,7 @@ module TOC clothingExtraSubmenu = InstallProstLeft, BodyLocation = TOC_ArmProst_L, Weight = 2, - CombatSpeedModifier = 1.5, + CombatSpeedModifier = 1.1, BloodLocation = UpperArms;UpperBody, Insulation = 1.0, WindResistance = 1.0, @@ -76,7 +76,7 @@ module TOC clothingExtraSubmenu = InstallProstRight, BodyLocation = TOC_ArmProst_R, Weight = 2, - CombatSpeedModifier = 1.5, + CombatSpeedModifier = 1.1, BloodLocation = UpperArms;UpperBody, Insulation = 1.0, WindResistance = 1.0,