Cleanliness malus

This commit is contained in:
Pao
2023-02-03 15:02:43 +01:00
parent dfae5b6aa3
commit c3e977a10a
3 changed files with 17 additions and 15 deletions

View File

@@ -1,4 +1,3 @@
------------------------------------------
-------- THE ONLY CURE BUT BETTER --------
------------------------------------------
@@ -33,13 +32,9 @@ function TocEquipProsthesis(part_name, prosthesis_base_name)
end
end
end
---Unequip a prosthesis clothing item and returns it to the inventory as a normal item
---@param part_name string
function TheOnlyCure.UnequipProsthesis(patient, part_name, equipped_prosthesis)

View File

@@ -117,15 +117,9 @@ local function SetHealthStatusForBodyPart(part_data, part_name, player)
end
--Wound cleanliness
-- TODO we need to check the upper body part since that's what getting wounded eheh
local amputated_limb_item = TocGetAmputationItemInInventory(player, part_name)
--getDirtyness
-- Cicatrization check
if not part_data[part_name].is_cicatrized then
@@ -217,8 +211,21 @@ local function TocUpdateEveryTenMinutes()
-- Updates the cicatrization time
for _, part_name in pairs(GetBodyParts()) do
if part_data[part_name].is_cut and not part_data[part_name].is_cicatrized then
part_data[part_name].cicatrization_time = part_data[part_name].cicatrization_time - SandboxVars.TOC.CicatrizationSpeedMultiplier
--Wound cleanliness contributes to cicatrization
-- TODO we reset this stuff every time we restart the game for compat reason, this is an issue
local amputated_limb_item = TocGetAmputationItemInInventory(player, part_name)
local item_dirtyness = amputated_limb_item:getDirtyness()/100
local item_bloodyness = amputated_limb_item:getBloodLevel()/100
local modifier = SandboxVars.TOC.CicatrizationSpeedMultiplier - item_bloodyness - item_dirtyness
print("TOC: Type " .. amputated_limb_item:getFullType())
print("TOC: Dirtyness " .. item_dirtyness)
print("TOC: Bloodyness " .. item_bloodyness)
part_data[part_name].cicatrization_time = part_data[part_name].cicatrization_time - modifier
end

View File

@@ -15,7 +15,7 @@ imports
Weight = 0,
CombatSpeedModifier = 0.9,
/*BloodLocation = UpperArms;LowerArms,*/
BloodLocation = Hands;LowerArms,
Insulation = 1.0,
WindResistance = 1.0,
@@ -69,7 +69,7 @@ imports
Weight = 0,
CombatSpeedModifier = 0.9,
/*BloodLocation = UpperArms;LowerArms,*/
BloodLocation = Hands;LowerArms,
Insulation = 1.0,
WindResistance = 1.0,