]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add popup for healing target (#29804)
authorlzk <124214523+lzk228@users.noreply.github.com>
Tue, 9 Jul 2024 08:41:47 +0000 (10:41 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Jul 2024 08:41:47 +0000 (04:41 -0400)
* Add popup for healing target

* hop

* huh

* fix one

* fix showing popup to all

Content.Server/Medical/HealingSystem.cs
Resources/Locale/en-US/medical/components/healing-component.ftl

index ed33e60dac480615d0ceebcd1a87facee19bfe78..52d6a3fafa76193a3cdf59fe42ea36b676963b51 100644 (file)
@@ -10,12 +10,14 @@ using Content.Shared.Damage;
 using Content.Shared.Database;
 using Content.Shared.DoAfter;
 using Content.Shared.FixedPoint;
+using Content.Shared.IdentityManagement;
 using Content.Shared.Interaction;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Medical;
 using Content.Shared.Mobs;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Mobs.Systems;
+using Content.Shared.Popups;
 using Content.Shared.Stacks;
 using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
@@ -188,6 +190,12 @@ public sealed class HealingSystem : EntitySystem
 
         var isNotSelf = user != target;
 
+        if (isNotSelf)
+        {
+            var msg = Loc.GetString("medical-item-popup-target", ("user", Identity.Entity(user, EntityManager)), ("item", uid));
+            _popupSystem.PopupEntity(msg, target, target, PopupType.Medium);
+        }
+
         var delay = isNotSelf
             ? component.Delay
             : component.Delay * GetScaledHealingPenalty(user, component);
index 5c2aaaabd9bcf88788f6111916b492eef54457ee..1deb39db091a08498bf7e39d3541352fa9515667 100644 (file)
@@ -1,3 +1,4 @@
 medical-item-finished-using = You have finished healing with the {$item}
 medical-item-cant-use = There is no damage you can heal with the {$item}
 medical-item-stop-bleeding = They have stopped bleeding
+medical-item-popup-target = {CAPITALIZE(THE($user))} is trying to heal you with the {$item}!