diff --git a/media/lua/client/TOC_Checks.lua b/media/lua/client/TOC_Checks.lua index 8692923..eb599cf 100644 --- a/media/lua/client/TOC_Checks.lua +++ b/media/lua/client/TOC_Checks.lua @@ -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 diff --git a/media/lua/client/TOC_UI.lua b/media/lua/client/TOC_UI.lua index e3a7122..0c9859a 100644 --- a/media/lua/client/TOC_UI.lua +++ b/media/lua/client/TOC_UI.lua @@ -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") diff --git a/media/lua/client/TimedActions/ISCutLimb.lua b/media/lua/client/TimedActions/ISCutLimb.lua index 56fbc89..bdaf3b8 100644 --- a/media/lua/client/TimedActions/ISCutLimb.lua +++ b/media/lua/client/TimedActions/ISCutLimb.lua @@ -38,7 +38,9 @@ function ISCutLimb:start() local body_damage = self.patient:getBodyDamage() local body_damage_part = body_damage:getBodyPart(body_part_type) + body_damage_part:setBleeding(true) + body_damage_part:setCut(true) body_damage_part:setBleedingTime(ZombRand(10,20)) end