From 505a3cc7e2d75928c536080d759f0c198ea6f4c2 Mon Sep 17 00:00:00 2001 From: Pao Date: Sun, 15 Jan 2023 17:52:36 +0100 Subject: [PATCH] I said, changed some todos. --- media/lua/client/TOC_Debug.lua | 3 +-- media/lua/client/TOC_HelperFunctions.lua | 2 +- media/lua/client/TOC_LocalActions.lua | 4 ++-- media/lua/client/TOC_Update.lua | 9 +++++++-- media/lua/client/TimedActions/AddedToOther.lua | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/media/lua/client/TOC_Debug.lua b/media/lua/client/TOC_Debug.lua index 82878bc..962f69d 100644 --- a/media/lua/client/TOC_Debug.lua +++ b/media/lua/client/TOC_Debug.lua @@ -1,12 +1,11 @@ function ResetEverything() local player = getPlayer() - local mod_data = player:getModData() -- TODO we need to send data... + local mod_data = player:getModData() mod_data.TOC = nil TheOnlyCure.InitTheOnlyCure(_, player) -- Destroy the amputation model - for _,v in ipairs(GetBodyParts()) do local cloth = player:getInventory():FindAndReturn(TocFindAmputatedClothingFromPartName(v)) diff --git a/media/lua/client/TOC_HelperFunctions.lua b/media/lua/client/TOC_HelperFunctions.lua index d79467f..9a86b63 100644 --- a/media/lua/client/TOC_HelperFunctions.lua +++ b/media/lua/client/TOC_HelperFunctions.lua @@ -63,7 +63,7 @@ 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 - -- TODO Think a little better about this + -- TODO Think a little better about this, do we want to trigger bleeding or not? body_part_type:setBleeding(false) --body_part_type:setBleedingTime(ZombRand(1, 5)) -- Reset the bleeding, maybe make it random diff --git a/media/lua/client/TOC_LocalActions.lua b/media/lua/client/TOC_LocalActions.lua index ec0d193..a054fd9 100644 --- a/media/lua/client/TOC_LocalActions.lua +++ b/media/lua/client/TOC_LocalActions.lua @@ -22,8 +22,8 @@ function TocOperateLocal(_, patient, surgeon, part_name, use_oven) end function TocEquipProsthesisLocal(_, patient, surgeon, part_name) - -- TODO probably completely broken for MP - -- TODO this is really janky + -- TODO probably completely broken for MP + -- TODO this is really janky local surgeon_inventory = surgeon:getInventory() local prosthesis_to_equip = surgeon_inventory:getItemFromType('TOC.MetalHand') or surgeon_inventory:getItemFromType('TOC.MetalHook') or diff --git a/media/lua/client/TOC_Update.lua b/media/lua/client/TOC_Update.lua index f0879a3..ca43c3e 100644 --- a/media/lua/client/TOC_Update.lua +++ b/media/lua/client/TOC_Update.lua @@ -87,6 +87,7 @@ function TheOnlyCure.HealSpecificPart(toc_data, part_name, player) local bandage_life = 0 local bandage_type = "" + -- TODO Bandages should have some disadvantage when not operated... Like getting drenched or something if body_part_type:bandaged() then is_bandaged = true -- this is useless bandage_life = body_part_type:getBandageLife() @@ -143,6 +144,10 @@ function TheOnlyCure.HealSpecificPart(toc_data, part_name, player) -- TODO make this random if the player gets it or not --FIXME they're gonna stack!!!! + + -- if player does not have brave then add it + -- if player does not have insensitve then add it + player:getTraits():add("Brave") player:getTraits():add("Insensitive") body_part_type:setBleeding(false); @@ -193,7 +198,7 @@ function TheOnlyCure.UpdateEveryOneMinute() local toc_data = player:getModData().TOC if toc_data ~= nil then - --TheOnlyCure.TryDropItem(player, toc_data) -- TODO this is kinda useless I think + --TheOnlyCure.TryDropItem(player, toc_data) -- TODO this must be set only in the cut\equipping function, not here TheOnlyCure.CheckIfPlayerIsInfected(player, toc_data) TheOnlyCure.UpdatePlayerHealth(player, toc_data) end @@ -223,7 +228,7 @@ function TheOnlyCure.UpdateEveryTenMinutes() end end - player:transmitModData() -- TODO if we do this every minutes, do we need to re do it here? + player:transmitModData() end diff --git a/media/lua/client/TimedActions/AddedToOther.lua b/media/lua/client/TimedActions/AddedToOther.lua index bb7849c..24b18b5 100644 --- a/media/lua/client/TimedActions/AddedToOther.lua +++ b/media/lua/client/TimedActions/AddedToOther.lua @@ -25,10 +25,11 @@ function ISBaseTimedAction:adjustMaxTime(maxTime) local protPartNames = {"RightHand", "RightForearm", "LeftHand", "LeftForearm"} local otherPartNames = {"RightArm", "LeftArm"} + --TODO this is dumb, it just makes action a lot slower, without checking for special cases like reading. Find a better way for i,name in ipairs(protPartNames) do if modData.TOC[name].is_cut then if modData.TOC[name].is_prosthesis_equipped then - maxTime = maxTime * modData.TOC[name].prosthesis_factor --TODO this is dumb + maxTime = maxTime * modData.TOC[name].prosthesis_factor else maxTime = maxTime * 2; end