I think I got almost everything. Now to check it

This commit is contained in:
Pao
2023-01-18 02:56:09 +01:00
parent 45e4aff79d
commit 5b3e10c0db
13 changed files with 352 additions and 378 deletions

View File

@@ -40,16 +40,16 @@ function ISInstallProsthesis:perform()
return
end
local prosthesis_name =TocFindCorrectClothingProsthesis(self.item:getType(), part_name)
local prosthesis_name =TocFindCorrectClothingProsthesis(prosthesis_base_name, part_name)
self.cloth = self.character:getInventory():AddItem(prosthesis_name)
if self.cloth ~= nil then
if part_name then
toc_data[part_name].is_prosthesis_equipped = true -- TODO should we show that the hand has a prost too if it's installed in the forearm?
toc_data[part_name].prosthesis_factor = TocFindProsthesisFactorFromItem(self.cloth)
toc_data.Limbs[part_name].is_prosthesis_equipped = true -- TODO should we show that the hand has a prost too if it's installed in the forearm?
toc_data.Limbs[part_name].equipped_prosthesis = toc_data.Prosthesis[prosthesis_base_name][part_name]
self.character:getInventory():Remove(self.item)
self.character:setWornItem(self.cloth:getBodyLocation(), self.cloth)
end