I said, changed some todos.

This commit is contained in:
Pao
2023-01-15 17:52:36 +01:00
parent 86ebb72d49
commit 505a3cc7e2
5 changed files with 13 additions and 8 deletions

View File

@@ -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))

View File

@@ -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

View File

@@ -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

View File

@@ -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