diff --git a/media/clothing/clothingItems/Prost_Left_LowerArm_LeatherBase_MetalHook.xml b/media/clothing/clothingItems/Prost_Left_LowerArm_LeatherBase_MetalHook.xml index 6cdacaf..2dacf2b 100644 --- a/media/clothing/clothingItems/Prost_Left_LowerArm_LeatherBase_MetalHook.xml +++ b/media/clothing/clothingItems/Prost_Left_LowerArm_LeatherBase_MetalHook.xml @@ -1,7 +1,7 @@ - Prost_Left_LowerArm_LeatherBase_MetalHook_Male - Prost_Left_LowerArm_LeatherBase_MetalHook_Female + Prost_Left_LowerArm_Base_Hook_Male + Prost_Left_LowerArm_Base_Hook_Female 129ee688-d4bb-4297-8eb2-f88974001217 false false diff --git a/media/clothing/clothingItems/Prost_Right_LowerArm_LeatherBase_MetalHook.xml b/media/clothing/clothingItems/Prost_Right_LowerArm_LeatherBase_MetalHook.xml index 323c521..6098b92 100644 --- a/media/clothing/clothingItems/Prost_Right_LowerArm_LeatherBase_MetalHook.xml +++ b/media/clothing/clothingItems/Prost_Right_LowerArm_LeatherBase_MetalHook.xml @@ -1,7 +1,7 @@ - Prost_Right_LowerArm_Hook_Male - Prost_Right_LowerArm_Hook_Female + Prost_Right_LowerArm_Base_Hook_Male + Prost_Right_LowerArm_Base_Hook_Female 1eb56768-d7ef-46e4-ac07-91d0e43d15fb false false diff --git a/media/fileGuidTable.xml b/media/fileGuidTable.xml index d8acaf2..ab35780 100644 --- a/media/fileGuidTable.xml +++ b/media/fileGuidTable.xml @@ -58,7 +58,7 @@ 714b78a7-8895-4f48-a29d-b6f12909db0e - media/clothing/clothingItems/Prost_Right_LowerArm_MetalHook.xml + media/clothing/clothingItems/Prost_Right_LowerArm_LeatherBase_MetalHook.xml 1eb56768-d7ef-46e4-ac07-91d0e43d15fb @@ -70,7 +70,7 @@ aea8e02a-cba0-48d0-9eb0-7087651306b0 - media/clothing/clothingItems/Prost_Left_lowerArm_MetalHook.xml + media/clothing/clothingItems/Prost_Left_LowerArm_LeatherBase_MetalHook.xml 129ee688-d4bb-4297-8eb2-f88974001217 diff --git a/media/lua/client/ActionsMethods/TOC_LocalActions.lua b/media/lua/client/ActionsMethods/TOC_LocalActions.lua index f22235b..76371c8 100644 --- a/media/lua/client/ActionsMethods/TOC_LocalActions.lua +++ b/media/lua/client/ActionsMethods/TOC_LocalActions.lua @@ -36,8 +36,9 @@ function TOC_LocalActions.EquipProsthesis(_, player, partName) local surgeonInv = player:getInventory() + -- TODO Find a better way to filter objects. Disabled for now and only gets LeatherBase - local prosthesisToEquip = surgeonInv:getItemFromType('TOC.ProstNormal_LeatherBase_MetalHook') + local prosthesisToEquip = surgeonInv:getItemFromType('TOC.LeatherBase_MetalHook') if prosthesisToEquip then ISTimedActionQueue.add(TOC_InstallProsthesisAction:new(player, player, prosthesisToEquip, partName)) else diff --git a/media/lua/client/ActionsMethods/TOC_OperateLimb.lua b/media/lua/client/ActionsMethods/TOC_OperateLimb.lua index 2477c44..1fd996c 100644 --- a/media/lua/client/ActionsMethods/TOC_OperateLimb.lua +++ b/media/lua/client/ActionsMethods/TOC_OperateLimb.lua @@ -58,12 +58,13 @@ function TOC.OperateLimb(partName, surgeonFactor, useOven) if limbsData[partName].isOperated == false and limbsData[partName].isCut == true then limbsData[partName].isOperated = true limbsData[partName].cicatrizationTime = limbsData[partName].cicatrizationTime - (surgeonFactor * 200) - if useOven then limbsData[partName].is_cauterized = true end - for _, depended_v in pairs(limbParameters[partName].depends_on) do - limbsData[depended_v].isOperated = true - limbsData[depended_v].cicatrizationTime = limbsData[depended_v].cicatrizationTime - - (surgeonFactor * 200) - if useOven then limbsData[depended_v].isCauterized = true end + if useOven then limbsData[partName].isCauterized = true end + for _, dependedPart in pairs(limbParameters[partName].dependsOn) do + limbsData[dependedPart].isOperated = true + -- TODO We should not have cicatrization time for depended parts. + -- limbsData[dependedPart].cicatrizationTime = limbsData[dependedPart].cicatrizationTime - + -- (surgeonFactor * 200) + if useOven then limbsData[dependedPart].isCauterized = true end end end diff --git a/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua b/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua index d6a413e..5d28905 100644 --- a/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua +++ b/media/lua/client/ActionsMethods/TOC_ProsthesisMethods.lua @@ -16,7 +16,7 @@ function TOC.EquipProsthesis(partName, prosthesisItem, prosthesisBaseName) local player = getPlayer() local TOCModData = player:getModData().TOC - local equippedProsthesis = GenerateEquippedProsthesis(prosthesisItem, player:getInventory(), "Hand") + local equippedProsthesis = GenerateEquippedProsthesis(prosthesisItem, player:getInventory(), partName) --print("TOC: Test durability new item " .. added_prosthesis_mod_data.TOC.durability) @@ -34,7 +34,7 @@ function TOC.EquipProsthesis(partName, prosthesisItem, prosthesisBaseName) -- TODO Change the value passed, it's wrong --TOCModData.limbs[partName].equippedProsthesis = TOCModData.Prosthesis[prosthesisBaseName][partName] - + if player:isFemale() then equippedProsthesis:getVisual():setTextureChoice(1) else diff --git a/media/lua/client/TOC_ProsthesisHandler.lua b/media/lua/client/TOC_ProsthesisHandler.lua index cfc3736..bf25688 100644 --- a/media/lua/client/TOC_ProsthesisHandler.lua +++ b/media/lua/client/TOC_ProsthesisHandler.lua @@ -50,9 +50,9 @@ end ---comment ---@param prosthesisItem any Normal item ---@param inventory any player inventory ----@param limb any +---@param partName any ---@return any equipped_prosthesis clothing item equipped prosthesis -function GenerateEquippedProsthesis(prosthesisItem, inventory, limb) +function GenerateEquippedProsthesis(prosthesisItem, inventory, partName) -- TODO Durability should be decided from the clothing item xml. Same thing for disassembling stuff -- TODO some stuff should be defined by the limb, like -10 if forearm in speed -- when we equip a prosthesis, we're gonna pass these parameters to the newly generated clothing item @@ -78,11 +78,11 @@ function GenerateEquippedProsthesis(prosthesisItem, inventory, limb) -- durability_top, speed_top = GetProsthesisStats(top_table, prosthesis_name) end - - local equippedProsthesisName = TocFindCorrectClothingProsthesis() + local baseName = prosthesisItem:getType() + local equippedProsthesisName = TocFindCorrectClothingProsthesis(baseName, partName) - local equippedProsthesis = inventory:AddItem(prosthesisName) + local equippedProsthesis = inventory:AddItem(equippedProsthesisName) equippedProsthesis:setCondition(prosthesisItem:getCondition()) equippedProsthesis:getModData().TOC = { diff --git a/media/models_X/Prost_Left_Hand_Hook_Female.fbx b/media/models_X/Prost_Left_Hand_Hook_Female.fbx deleted file mode 100644 index ecc9f8b..0000000 Binary files a/media/models_X/Prost_Left_Hand_Hook_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Left_Hand_Hook_Male.fbx b/media/models_X/Prost_Left_Hand_Hook_Male.fbx deleted file mode 100644 index d928d01..0000000 Binary files a/media/models_X/Prost_Left_Hand_Hook_Male.fbx and /dev/null differ diff --git a/media/models_X/Prost_Left_Hand_MetalHand_Female.fbx b/media/models_X/Prost_Left_Hand_MetalHand_Female.fbx deleted file mode 100644 index 0bb79b8..0000000 Binary files a/media/models_X/Prost_Left_Hand_MetalHand_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Left_Hand_MetalHand_Male.fbx b/media/models_X/Prost_Left_Hand_MetalHand_Male.fbx deleted file mode 100644 index 0bb79b8..0000000 Binary files a/media/models_X/Prost_Left_Hand_MetalHand_Male.fbx and /dev/null differ diff --git a/media/models_X/Prost_Left_LowerArm_Hook_Male.fbx b/media/models_X/Prost_Left_LowerArm_Base_Hook_Male.fbx similarity index 100% rename from media/models_X/Prost_Left_LowerArm_Hook_Male.fbx rename to media/models_X/Prost_Left_LowerArm_Base_Hook_Male.fbx diff --git a/media/models_X/Prost_Left_LowerArm_Hook_Female.fbx b/media/models_X/Prost_Left_LowerArm_Hook_Female.fbx deleted file mode 100644 index b5caceb..0000000 Binary files a/media/models_X/Prost_Left_LowerArm_Hook_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Left_LowerArm_MetalHand_Female.fbx b/media/models_X/Prost_Left_LowerArm_MetalHand_Female.fbx deleted file mode 100644 index 548091b..0000000 Binary files a/media/models_X/Prost_Left_LowerArm_MetalHand_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Left_LowerArm_MetalHand_Male.fbx b/media/models_X/Prost_Left_LowerArm_MetalHand_Male.fbx deleted file mode 100644 index 548091b..0000000 Binary files a/media/models_X/Prost_Left_LowerArm_MetalHand_Male.fbx and /dev/null differ diff --git a/media/models_X/Prost_Right_Hand_Hook_Female.fbx b/media/models_X/Prost_Right_Hand_Hook_Female.fbx deleted file mode 100644 index 811be9f..0000000 Binary files a/media/models_X/Prost_Right_Hand_Hook_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Right_Hand_Hook_Male.fbx b/media/models_X/Prost_Right_Hand_Hook_Male.fbx deleted file mode 100644 index 3f5223c..0000000 Binary files a/media/models_X/Prost_Right_Hand_Hook_Male.fbx and /dev/null differ diff --git a/media/models_X/Prost_Right_Hand_MetalHand_Female.fbx b/media/models_X/Prost_Right_Hand_MetalHand_Female.fbx deleted file mode 100644 index 35bd9b0..0000000 Binary files a/media/models_X/Prost_Right_Hand_MetalHand_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Right_Hand_MetalHand_Male.fbx b/media/models_X/Prost_Right_Hand_MetalHand_Male.fbx deleted file mode 100644 index 35bd9b0..0000000 Binary files a/media/models_X/Prost_Right_Hand_MetalHand_Male.fbx and /dev/null differ diff --git a/media/models_X/Prost_Right_LowerArm_Hook_Male.fbx b/media/models_X/Prost_Right_LowerArm_Base_Hook_Male.fbx similarity index 100% rename from media/models_X/Prost_Right_LowerArm_Hook_Male.fbx rename to media/models_X/Prost_Right_LowerArm_Base_Hook_Male.fbx diff --git a/media/models_X/Prost_Right_LowerArm_Hook_Female.fbx b/media/models_X/Prost_Right_LowerArm_Hook_Female.fbx deleted file mode 100644 index fa42b13..0000000 Binary files a/media/models_X/Prost_Right_LowerArm_Hook_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Right_LowerArm_MetalHand_Female.fbx b/media/models_X/Prost_Right_LowerArm_MetalHand_Female.fbx deleted file mode 100644 index 2d57a0b..0000000 Binary files a/media/models_X/Prost_Right_LowerArm_MetalHand_Female.fbx and /dev/null differ diff --git a/media/models_X/Prost_Right_LowerArm_MetalHand_Male.fbx b/media/models_X/Prost_Right_LowerArm_MetalHand_Male.fbx deleted file mode 100644 index 2d57a0b..0000000 Binary files a/media/models_X/Prost_Right_LowerArm_MetalHand_Male.fbx and /dev/null differ diff --git a/media/scripts/TOC_items.txt b/media/scripts/TOC_items.txt index d79c321..6a7bac9 100644 --- a/media/scripts/TOC_items.txt +++ b/media/scripts/TOC_items.txt @@ -555,7 +555,7 @@ item Prost_Left_LowerArm_LeatherBase_MetalHook BodyLocation = TOC_ArmLeftProsthesis, BloodLocation = Hands, Icon = metalLeg, - Tooltip = TempTooltip, + Tooltip = Tooltip test lower arm test whatever, CanHaveHoles = false, } item Prost_Right_LowerArm_LeatherBase_MetalHook