Skip to content

Commit

Permalink
Optimization!
Browse files Browse the repository at this point in the history
  • Loading branch information
thetolbean committed Nov 10, 2024
1 parent 0384373 commit 2801ebe
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Content.Shared/Damage/Systems/DamageExamineSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ private FormattedMessage GetDamageExamine(DamageSpecifier damageSpecifier, strin
}
else
{
if (damageSpecifier.DamageDict.Count == 1)
if (damageSpecifier.GetTotal() == FixedPoint2.Zero && !damageSpecifier.AnyPositive())
{
// 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-none"));
return msg;
}

msg.AddMarkupOrThrow(Loc.GetString("damage-examine-type", ("type", type)));
}

Expand Down

0 comments on commit 2801ebe

Please sign in to comment.