From 35e963a0ea611fe991565fb1b522e073df2c4a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Sat, 22 Aug 2020 19:37:23 +0200 Subject: [PATCH] Lights now show a popup message when you burn yourself. --- .../PowerReceiverUsers/PoweredLightComponent.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs index 5f6edb59e6..716e72ee7a 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs @@ -18,6 +18,7 @@ using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; +using Robust.Shared.Localization; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; @@ -29,6 +30,8 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece [RegisterComponent] public class PoweredLightComponent : Component, IInteractHand, IInteractUsing, IMapInit { + [Dependency] private IServerNotifyManager _notifyManager = default!; + public override string Name => "PoweredLight"; private static readonly TimeSpan _thunkDelay = TimeSpan.FromSeconds(2); @@ -100,6 +103,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece void Burn() { + _notifyManager.PopupMessage(Owner, eventArgs.User, Loc.GetString("You burn your hand!")); damageableComponent.ChangeDamage(DamageType.Heat, 20, false, Owner); var audioSystem = EntitySystem.Get(); audioSystem.PlayFromEntity("/Audio/Effects/lightburn.ogg", Owner);