Merge pull request #89 from frosty-dev/popup-for-healing-target
Popup for healing target
This commit is contained in:
@@ -10,12 +10,14 @@ using Content.Shared.Damage;
|
|||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
using Content.Shared.DoAfter;
|
using Content.Shared.DoAfter;
|
||||||
using Content.Shared.FixedPoint;
|
using Content.Shared.FixedPoint;
|
||||||
|
using Content.Shared.IdentityManagement;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Interaction.Events;
|
using Content.Shared.Interaction.Events;
|
||||||
using Content.Shared.Medical;
|
using Content.Shared.Medical;
|
||||||
using Content.Shared.Mobs;
|
using Content.Shared.Mobs;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Mobs.Systems;
|
using Content.Shared.Mobs.Systems;
|
||||||
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Stacks;
|
using Content.Shared.Stacks;
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
@@ -189,6 +191,14 @@ public sealed class HealingSystem : EntitySystem
|
|||||||
|
|
||||||
var isNotSelf = user != target;
|
var isNotSelf = user != target;
|
||||||
|
|
||||||
|
//Amour
|
||||||
|
if (isNotSelf)
|
||||||
|
{
|
||||||
|
var msg = Loc.GetString("medical-item-popup-target", ("user", Identity.Entity(user, EntityManager)), ("item", uid));
|
||||||
|
_popupSystem.PopupEntity(msg, target, target, PopupType.Medium);
|
||||||
|
}
|
||||||
|
//Amour
|
||||||
|
|
||||||
var delay = isNotSelf
|
var delay = isNotSelf
|
||||||
? component.Delay
|
? component.Delay
|
||||||
: component.Delay * GetScaledHealingPenalty(user, component);
|
: component.Delay * GetScaledHealingPenalty(user, component);
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ using Content.Server.PowerCell;
|
|||||||
using Content.Server.Temperature.Components;
|
using Content.Server.Temperature.Components;
|
||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.DoAfter;
|
using Content.Shared.DoAfter;
|
||||||
|
using Content.Shared.IdentityManagement;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Interaction.Events;
|
using Content.Shared.Interaction.Events;
|
||||||
using Content.Shared.MedicalScanner;
|
using Content.Shared.MedicalScanner;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.PowerCell;
|
using Content.Shared.PowerCell;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
@@ -27,6 +29,7 @@ public sealed class HealthAnalyzerSystem : EntitySystem
|
|||||||
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
||||||
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
||||||
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
||||||
|
[Dependency] private readonly SharedPopupSystem _popupSystem = default!; //Amour
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -85,6 +88,10 @@ public sealed class HealthAnalyzerSystem : EntitySystem
|
|||||||
NeedHand = true,
|
NeedHand = true,
|
||||||
BreakOnMove = true
|
BreakOnMove = true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Amour
|
||||||
|
var msg = Loc.GetString("health-analyzer-popup-scan-target", ("user", Identity.Entity(args.User, EntityManager)));sa
|
||||||
|
_popupSystem.PopupEntity(msg, args.Target.Value, args.Target.Value, PopupType.Medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDoAfter(Entity<HealthAnalyzerComponent> uid, ref HealthAnalyzerDoAfterEvent args)
|
private void OnDoAfter(Entity<HealthAnalyzerComponent> uid, ref HealthAnalyzerDoAfterEvent args)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
medical-item-finished-using = Вы закончили исцеление с помощью { $item }
|
medical-item-finished-using = Вы закончили исцеление с помощью { $item }
|
||||||
medical-item-cant-use = Нет никаких повреждений, которые вы могли бы залечить с помощью { $item }
|
medical-item-cant-use = Нет никаких повреждений, которые вы могли бы залечить с помощью { $item }
|
||||||
medical-item-stop-bleeding = Оно перестало кровоточить
|
medical-item-stop-bleeding = Оно перестало кровоточить
|
||||||
|
#Amour
|
||||||
|
medical-item-popup-target = {CAPITALIZE(THE($user))} пытается исцелить тебя с помощью {$item}!
|
||||||
|
|||||||
@@ -37,3 +37,6 @@ health-analyzer-window-damage-group-Genetic = Генетические:
|
|||||||
health-analyzer-window-damage-type-Cellular = Клеточные:
|
health-analyzer-window-damage-type-Cellular = Клеточные:
|
||||||
|
|
||||||
health-analyzer-window-malnutrition = Тяжёлое недоедание
|
health-analyzer-window-malnutrition = Тяжёлое недоедание
|
||||||
|
|
||||||
|
#Amour
|
||||||
|
health-analyzer-popup-scan-target = {CAPITALIZE(THE($user))} пытается вас просканировать!
|
||||||
|
|||||||
Reference in New Issue
Block a user