corrected some wrong checks

This commit is contained in:
Pao
2023-01-15 04:45:45 +01:00
parent 80725cf56d
commit f35c8ca9ca
3 changed files with 14 additions and 4 deletions

View File

@@ -15,8 +15,16 @@ function CheckIfProsthesisAlreadyInstalled(toc_data, part_name)
local r = "Right"
local l = "Left"
return (string.find(part_name, r) and not (toc_data[r .. "Hand"].is_prosthesis_equipped or toc_data[r .. "Forearm"].is_prosthesis_equipped)) or
(string.find(part_name, l) and not (toc_data[l .. "Hand"].is_prosthesis_equipped or toc_data[l .. "Forearm"].is_prosthesis_equipped))
if string.find(part_name, r) then
return (toc_data[r .. "Hand"].is_prosthesis_equipped or toc_data[r .. "Forearm"].is_prosthesis_equipped)
elseif string.find(part_name, l) then
return (toc_data[l .. "Hand"].is_prosthesis_equipped or toc_data[l .. "Forearm"].is_prosthesis_equipped)
end
end