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

@@ -441,11 +441,11 @@ function SetupTocDescUI(surgeon, patient, toc_data, part_name)
-- TODO add check for cuts and scratches
desc_ui["status"]:setText("Not cut")
desc_ui["status"]:setColor(1, 1, 1, 1)
if GetSawInInventory(surgeon) and CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then
if GetSawInInventory(surgeon) and not CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then
desc_ui["b1"]:setVisible(true)
desc_ui["b1"]:setText("Cut")
desc_ui["b1"]:addArg("option", "Cut")
elseif GetSawInInventory(surgeon) and not CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then
elseif GetSawInInventory(surgeon) and CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then
desc_ui["b1"]:setVisible(true)
desc_ui["b1"]:setText("Remove prosthesis before")
desc_ui["b1"]:addArg("option", "Nothing")