From: Preston Smith Date: Wed, 30 Oct 2024 03:25:42 +0000 (-0500) Subject: Add no damage phrase and logic X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=03843734e4de1c9f3c34d029aca3e7935f7eafde;p=space-station-14.git Add no damage phrase and logic --- diff --git a/Content.Shared/Damage/Systems/DamageExamineSystem.cs b/Content.Shared/Damage/Systems/DamageExamineSystem.cs index 53436a920a..72c1af29b2 100644 --- a/Content.Shared/Damage/Systems/DamageExamineSystem.cs +++ b/Content.Shared/Damage/Systems/DamageExamineSystem.cs @@ -61,6 +61,15 @@ public sealed class DamageExamineSystem : EntitySystem } else { + if (damageSpecifier.DamageDict.Count == 1) + { + // May be simplified to using a foreach(Var x) despite being only one item + if(damageSpecifier.DamageDict.Values.GetEnumerator().Current == FixedPoint2.Zero) + { + msg.AddMarkupOrThrow(Loc.GetString("damage-none")); + return msg; + } + } msg.AddMarkupOrThrow(Loc.GetString("damage-examine-type", ("type", type))); } diff --git a/Resources/Locale/en-US/damage/damage-examine.ftl b/Resources/Locale/en-US/damage/damage-examine.ftl index 974b8fa965..848adeb31a 100644 --- a/Resources/Locale/en-US/damage/damage-examine.ftl +++ b/Resources/Locale/en-US/damage/damage-examine.ftl @@ -10,3 +10,4 @@ damage-throw = throw damage-examine = It does the following damage: damage-examine-type = It does the following [color=cyan]{$type}[/color] damage: damage-value = - [color=red]{$amount}[/color] units of [color=yellow]{$type}[/color]. +damage-none = It does no damage.