corrected some wrong checks
This commit is contained in:
@@ -15,8 +15,16 @@ function CheckIfProsthesisAlreadyInstalled(toc_data, part_name)
|
|||||||
local r = "Right"
|
local r = "Right"
|
||||||
local l = "Left"
|
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
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -441,11 +441,11 @@ function SetupTocDescUI(surgeon, patient, toc_data, part_name)
|
|||||||
-- TODO add check for cuts and scratches
|
-- TODO add check for cuts and scratches
|
||||||
desc_ui["status"]:setText("Not cut")
|
desc_ui["status"]:setText("Not cut")
|
||||||
desc_ui["status"]:setColor(1, 1, 1, 1)
|
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"]:setVisible(true)
|
||||||
desc_ui["b1"]:setText("Cut")
|
desc_ui["b1"]:setText("Cut")
|
||||||
desc_ui["b1"]:addArg("option", "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"]:setVisible(true)
|
||||||
desc_ui["b1"]:setText("Remove prosthesis before")
|
desc_ui["b1"]:setText("Remove prosthesis before")
|
||||||
desc_ui["b1"]:addArg("option", "Nothing")
|
desc_ui["b1"]:addArg("option", "Nothing")
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ function ISCutLimb:start()
|
|||||||
local body_damage = self.patient:getBodyDamage()
|
local body_damage = self.patient:getBodyDamage()
|
||||||
local body_damage_part = body_damage:getBodyPart(body_part_type)
|
local body_damage_part = body_damage:getBodyPart(body_part_type)
|
||||||
|
|
||||||
|
|
||||||
body_damage_part:setBleeding(true)
|
body_damage_part:setBleeding(true)
|
||||||
|
body_damage_part:setCut(true)
|
||||||
body_damage_part:setBleedingTime(ZombRand(10,20))
|
body_damage_part:setBleedingTime(ZombRand(10,20))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user