fixing stuff

This commit is contained in:
Pao
2023-03-19 22:47:06 +01:00
parent bf5a762ed2
commit 436d668096
62 changed files with 1228 additions and 1254 deletions

View File

@@ -32,12 +32,12 @@ function TOC_LocalActions.Operate(_, player, partName, useOven)
end
end
-- TODO This is gonna get deleted
function TOC_LocalActions.EquipProsthesis(_, player, partName)
local surgeonInv = player:getInventory()
local prosthesisToEquip = surgeonInv:getItemFromType('TOC.MetalHand') or
surgeonInv:getItemFromType('TOC.MetalHook') or
surgeonInv:getItemFromType('TOC.WoodenHook')
-- TODO Find a better way to filter objects. Disabled for now and only gets LeatherBase
local prosthesisToEquip = surgeonInv:getItemFromType('TOC.ProstNormal_LeatherBase_MetalHook')
if prosthesisToEquip then
ISTimedActionQueue.add(TOC_InstallProsthesisAction:new(player, player, prosthesisToEquip, partName))
else

View File

@@ -78,6 +78,10 @@ function GenerateEquippedProsthesis(prosthesisItem, inventory, limb)
-- durability_top, speed_top = GetProsthesisStats(top_table, prosthesis_name)
end
local equippedProsthesisName = TocFindCorrectClothingProsthesis()
local equippedProsthesis = inventory:AddItem(prosthesisName)
equippedProsthesis:setCondition(prosthesisItem:getCondition())