Cleanliness malus
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user