Fixed stacking of traits

This commit is contained in:
Pao
2023-01-20 23:13:09 +01:00
parent 0c5ad67eaf
commit bfec6699ce

View File

@@ -116,13 +116,16 @@ function TheOnlyCure.SetHealthStatusForBodyPart(part_data, part_name, player)
part_data[part_name].is_cicatrized = true part_data[part_name].is_cicatrized = true
-- TODO make this random if the player gets it or not -- 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 (not player:HasTrait("Brave")) and ZombRand(1, 11) > 5 then
-- if player does not have insensitve then add it player:getTraits():add("Brave")
end
if (not player:HasTrait("Insensitive")) and ZombRand(1, 11) > 5 then
player:getTraits():add("Insensitive")
end
player:getTraits():add("Brave")
player:getTraits():add("Insensitive")
body_part_type:setBleeding(false); body_part_type:setBleeding(false);
body_part_type:setDeepWounded(false) body_part_type:setDeepWounded(false)
body_part_type:setBleedingTime(0) body_part_type:setBleedingTime(0)