Skip to content

Commit

Permalink
Add popup for healing target (space-wizards#29804)
Browse files Browse the repository at this point in the history
* Add popup for healing target

* hop

* huh

* fix one

* fix showing popup to all
  • Loading branch information
lzk228 authored Jul 9, 2024
1 parent 9bf3c33 commit 74d9ac7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Content.Server/Medical/HealingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
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;
Expand Down Expand Up @@ -188,6 +190,12 @@ targetDamage.DamageContainerID is not null &&

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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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}!

0 comments on commit 74d9ac7

Please sign in to comment.