Cleaned some stuff

This commit is contained in:
Pao
2023-01-20 02:14:21 +01:00
parent 101c19dde7
commit de9d201e28
3 changed files with 20 additions and 22 deletions

View File

@@ -135,6 +135,8 @@ end
-- end
function CheckIfItemIsProsthesis(item)
-- TODO find a cleaner way
local item_full_type = item:getFullType()
local prosthesis_list = GetProsthesisList()
@@ -150,16 +152,10 @@ end
function CheckIfItemIsInstalledProsthesis(item)
local item_full_type = item:getFullType()
local installable_prosthesis_list = GetInstallableProsthesisList()
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
if string.find(item_full_type, "TOC.Prost_") then
return true
else
return false
end
return false
end