Little fixes

This commit is contained in:
ZioPao
2023-11-16 20:04:32 +01:00
parent fe6d88fa43
commit 1b248d744e
2 changed files with 8 additions and 6 deletions

View File

@@ -10,10 +10,11 @@ local ProsthesisHandler = {}
local bodyLocArmProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_ArmProst local bodyLocArmProst = StaticData.MOD_BODYLOCS_BASE_IND_STR.TOC_ArmProst
---Check if the following item is a prosthesis or not ---Check if the following item is a prosthesis or not
---@param item InventoryItem ---@param item InventoryItem?
---@return boolean ---@return boolean
function ProsthesisHandler.CheckIfProst(item) function ProsthesisHandler.CheckIfProst(item)
-- TODO Won't be correct when prost for legs are gonna be in -- 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) return item:getBodyLocation():contains(bodyLocArmProst)
end end
@@ -87,6 +88,7 @@ end
------------------------- -------------------------
--* Overrides *-- --* Overrides *--
---@diagnostic disable-next-line: duplicate-set-field ---@diagnostic disable-next-line: duplicate-set-field
local og_ISWearClothing_isValid = ISWearClothing.isValid local og_ISWearClothing_isValid = ISWearClothing.isValid
function ISWearClothing:isValid() function ISWearClothing:isValid()
@@ -106,8 +108,8 @@ end
local og_ISWearClothing_perform = ISWearClothing.perform local og_ISWearClothing_perform = ISWearClothing.perform
function ISWearClothing:perform() function ISWearClothing:perform()
og_ISWearClothing_perform(self)
ProsthesisHandler.SearchAndSetupProsthesis(self.item, true) ProsthesisHandler.SearchAndSetupProsthesis(self.item, true)
og_ISWearClothing_perform(self)
end end
local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid

View File

@@ -18,7 +18,7 @@ module TOC
clothingExtraSubmenu = InstallProstLeft, clothingExtraSubmenu = InstallProstLeft,
BodyLocation = TOC_ArmProst_L, BodyLocation = TOC_ArmProst_L,
Weight = 1.5, Weight = 1.5,
CombatSpeedModifier = 1.1, CombatSpeedModifier = 1.05,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
Insulation = 1.0, Insulation = 1.0,
WindResistance = 1.0, WindResistance = 1.0,
@@ -37,7 +37,7 @@ module TOC
clothingExtraSubmenu = InstallProstRight, clothingExtraSubmenu = InstallProstRight,
BodyLocation = TOC_ArmProst_R, BodyLocation = TOC_ArmProst_R,
Weight = 1.5, Weight = 1.5,
CombatSpeedModifier = 1.1, CombatSpeedModifier = 1.05,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
Insulation = 1.0, Insulation = 1.0,
WindResistance = 1.0, WindResistance = 1.0,
@@ -57,7 +57,7 @@ module TOC
clothingExtraSubmenu = InstallProstLeft, clothingExtraSubmenu = InstallProstLeft,
BodyLocation = TOC_ArmProst_L, BodyLocation = TOC_ArmProst_L,
Weight = 2, Weight = 2,
CombatSpeedModifier = 1.5, CombatSpeedModifier = 1.1,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
Insulation = 1.0, Insulation = 1.0,
WindResistance = 1.0, WindResistance = 1.0,
@@ -76,7 +76,7 @@ module TOC
clothingExtraSubmenu = InstallProstRight, clothingExtraSubmenu = InstallProstRight,
BodyLocation = TOC_ArmProst_R, BodyLocation = TOC_ArmProst_R,
Weight = 2, Weight = 2,
CombatSpeedModifier = 1.5, CombatSpeedModifier = 1.1,
BloodLocation = UpperArms;UpperBody, BloodLocation = UpperArms;UpperBody,
Insulation = 1.0, Insulation = 1.0,
WindResistance = 1.0, WindResistance = 1.0,