From 650159a046aeebcc375388c11a68393c0b610e2a Mon Sep 17 00:00:00 2001 From: Pao Date: Thu, 12 Jan 2023 22:32:33 +0100 Subject: [PATCH] I said fixed. --- media/lua/client/TOC_HelperFunctions.lua | 6 ++++-- media/lua/client/TOC_Update.lua | 11 +++++++---- media/lua/client/TimedActions/ISCutLimb.lua | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/media/lua/client/TOC_HelperFunctions.lua b/media/lua/client/TOC_HelperFunctions.lua index 14172f8..0b49180 100644 --- a/media/lua/client/TOC_HelperFunctions.lua +++ b/media/lua/client/TOC_HelperFunctions.lua @@ -61,8 +61,10 @@ function FixSingleBodyPartType(body_part_type, use_oven) body_part_type:setBleeding(false) body_part_type:setBleedingTime(0) -- no bleeding since it's been cauterized else - body_part_type:setBleeding(true); - body_part_type:setBleedingTime(ZombRand(1, 5)); -- Reset the bleeding, maybe make it random + -- TODO Think a little better about this + body_part_type:setBleeding(false) + + --body_part_type:setBleedingTime(ZombRand(1, 5)) -- Reset the bleeding, maybe make it random end end diff --git a/media/lua/client/TOC_Update.lua b/media/lua/client/TOC_Update.lua index 27a90e4..b4f5669 100644 --- a/media/lua/client/TOC_Update.lua +++ b/media/lua/client/TOC_Update.lua @@ -34,10 +34,13 @@ function TheOnlyCure.CheckIfPlayerIsInfected(player, toc_data) for _, v in ipairs(GetLimbsBodyPartTypes()) do - local toc_bodypart = TheOnlyCure.FindBodyPartFromBodyPartType(toc_data, v) - if body_damage:getBodyPart(v):bitten() and not toc_data[toc_bodypart].is_cut then - toc_data[toc_bodypart].is_infected = true - player:transmitModData() + local toc_bodypart = TheOnlyCure.FindTocDataPartNameFromBodyPartType(toc_data, v) + if body_damage:getBodyPart(v):bitten() and toc_bodypart ~= nil then + if toc_bodypart.is_cut then + toc_data[toc_bodypart].is_infected = true + player:transmitModData() + end + end end diff --git a/media/lua/client/TimedActions/ISCutLimb.lua b/media/lua/client/TimedActions/ISCutLimb.lua index 2646827..7122f29 100644 --- a/media/lua/client/TimedActions/ISCutLimb.lua +++ b/media/lua/client/TimedActions/ISCutLimb.lua @@ -87,9 +87,9 @@ function ISCutLimb:perform() end if self.patient ~= self.surgeon and isClient() then - SendCutArm(self.patient, self.partName, surgeonFact, useBandage, bandageAlcool, usePainkiller, painkillerCount); + SendCutLimb(self.patient, self.part_name, surgeon_factor, bandage_table, painkiller_table) else - CutArm(self.partName, surgeonFact, useBandage, bandageAlcool, usePainkiller, painkillerCount); + TheOnlyCure.CutLimb(self.part_name, surgeon_factor, bandage_table, painkiller_table) end self.surgeon:getXp():AddXP(Perks.Doctor, 400);