From: OctoRocket <88291550+OctoRocket@users.noreply.github.com> Date: Fri, 28 Apr 2023 14:01:24 +0000 (-0500) Subject: [Fix] Blood packs now should actually do something (#15752) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=a71f02e6722fcf19125f2305e8dc78df02a54633;p=space-station-14.git [Fix] Blood packs now should actually do something (#15752) * fixes blood packs * fix 2.0! --- diff --git a/Content.Server/Medical/HealingSystem.cs b/Content.Server/Medical/HealingSystem.cs index 438bb38456..a7f69159bd 100644 --- a/Content.Server/Medical/HealingSystem.cs +++ b/Content.Server/Medical/HealingSystem.cs @@ -151,7 +151,10 @@ public sealed class HealingSystem : EntitySystem if (!TryComp(uid, out var stack) || stack.Count < 1) return false; - if (!HasDamage(targetDamage, component)) + if (!TryComp(target, out var bloodstream)) + return false; + + if (!HasDamage(targetDamage, component) && !(bloodstream.BloodSolution.Volume < bloodstream.BloodSolution.MaxVolume && component.ModifyBloodLevel > 0)) { _popupSystem.PopupEntity(Loc.GetString("medical-item-cant-use", ("item", uid)), uid); return false; diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml index ac6a0c86db..8cfd7241fb 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml @@ -84,7 +84,7 @@ damageContainer: Biological damage: types: - bloodloss: -0.5 #minor bleed rate reduction. + Bloodloss: -0.5 #lowers bloodloss damage ModifyBloodLevel: 15 #restores about 5% blood per use on standard humanoids. healingBeginSound: path: "/Audio/Items/Medical/brutepack_begin.ogg"