Examine throwable damage (#18580)

This commit is contained in:
Slava0135
2023-08-07 12:09:35 +03:00
committed by GitHub
parent 88b3417c3d
commit 53db6bc265
11 changed files with 125 additions and 108 deletions

View File

@@ -29,34 +29,6 @@ namespace Content.Shared.Damage
SubscribeLocalEvent<DamageableComponent, RejuvenateEvent>(OnRejuvenate);
}
/// <summary>
/// Retrieves the damage examine values.
/// </summary>
public FormattedMessage GetDamageExamine(DamageSpecifier damageSpecifier, string? type = null)
{
var msg = new FormattedMessage();
if (string.IsNullOrEmpty(type))
{
msg.AddMarkup(Loc.GetString("damage-examine"));
}
else
{
msg.AddMarkup(Loc.GetString("damage-examine-type", ("type", type)));
}
foreach (var damage in damageSpecifier.DamageDict)
{
if (damage.Value != FixedPoint2.Zero)
{
msg.PushNewline();
msg.AddMarkup(Loc.GetString("damage-value", ("type", damage.Key), ("amount", damage.Value)));
}
}
return msg;
}
/// <summary>
/// Initialize a damageable component
/// </summary>