Fixed overriden functions

This commit is contained in:
Pao
2023-01-17 23:58:46 +01:00
parent 8656bd5696
commit e8944d93c8
3 changed files with 39 additions and 101 deletions

View File

@@ -104,16 +104,29 @@ end
function CheckIfItemIsProsthesis(item)
local item_full_type = item:getFullType()
local prosthesis_list = GetProsthesisList()
--return (item_full_type == "TOC.WoodenHook" or item_full_type == "TOC.MetalHook" or item_full_type == "TOC.MetalHand")
local check = prosthesis_list[item_full_type]
return check
for _, v in pairs(prosthesis_list) do
if v == item_full_type then
return true
end
end
return false
end
function CheckIfItemIsInstalledProsthesis(item)
local item_full_type = item:getFullType()
local installable_prosthesis_list = GetInstallableProsthesisList()
local check = installable_prosthesis_list[item_full_type]
return check
print("Checking for " .. item_full_type)
for _, v in pairs(installable_prosthesis_list)do
print(v)
if (v == item_full_type) then
return true
end
end
return false
end