]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[Fix] Blood packs now should actually do something (#15752)
authorOctoRocket <88291550+OctoRocket@users.noreply.github.com>
Fri, 28 Apr 2023 14:01:24 +0000 (09:01 -0500)
committerGitHub <noreply@github.com>
Fri, 28 Apr 2023 14:01:24 +0000 (07:01 -0700)
* fixes blood packs

* fix 2.0!

Content.Server/Medical/HealingSystem.cs
Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml

index 438bb38456d13b3d370a6353aa518e2cfa757a6d..a7f69159bd828ba40567d9282302cbc5cb042036 100644 (file)
@@ -151,7 +151,10 @@ public sealed class HealingSystem : EntitySystem
         if (!TryComp<StackComponent>(uid, out var stack) || stack.Count < 1)
             return false;
 
-        if (!HasDamage(targetDamage, component))
+        if (!TryComp<BloodstreamComponent>(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;
index ac6a0c86db0c1f15e4823bafa2100f4cd2e6fad0..8cfd7241fbffb5e8263183a0b729b757188605bf 100644 (file)
@@ -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"