From 33e11c0c3a045a6cafcfbb3117ad1bc9d68314ce Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 13 Oct 2019 17:01:53 +0200 Subject: [PATCH] Highlight "not powered" orange in PowerDevice examine. Also localizes it. --- .../GameObjects/Components/Power/PowerDevice.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Power/PowerDevice.cs b/Content.Server/GameObjects/Components/Power/PowerDevice.cs index fd7d8cdf6d..fa13d16d74 100644 --- a/Content.Server/GameObjects/Components/Power/PowerDevice.cs +++ b/Content.Server/GameObjects/Components/Power/PowerDevice.cs @@ -6,7 +6,9 @@ using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.IoC; +using Robust.Shared.Localization; using Robust.Shared.Log; +using Robust.Shared.Maths; using Robust.Shared.Serialization; using Robust.Shared.Utility; using Robust.Shared.ViewVariables; @@ -203,9 +205,15 @@ namespace Content.Server.GameObjects.Components.Power void IExamine.Examine(FormattedMessage message) { + var loc = IoCManager.Resolve(); + if (!Powered) { - message.AddText("The device is not powered."); + message.AddText(loc.GetString("The device is ")); + message.PushColor(Color.Orange); + message.AddText(loc.GetString("not powered")); + message.Pop(); + message.AddText("."); } }