Working new model

This commit is contained in:
Pao
2023-03-20 01:02:16 +01:00
parent 436d668096
commit 20883a1c38
24 changed files with 23 additions and 21 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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