Files
tbd-station-14/Content.Server/Construction/Completions/DamageEntity.cs
deltanedas 60c19853cd egg rework (#21606)
* egg and raw egg

* add DamageEntity

* boiling and exploding eggs

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-11-12 16:18:48 -07:00

24 lines
632 B
C#

using Content.Shared.Construction;
using Content.Shared.Damage;
using Content.Shared.Damage.Systems;
namespace Content.Server.Construction.Completions;
/// <summary>
/// Damage the entity on step completion.
/// </summary>
[DataDefinition]
public sealed partial class DamageEntity : IGraphAction
{
/// <summary>
/// Damage to deal to the entity.
/// </summary>
[DataField]
public DamageSpecifier Damage;
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
entityManager.System<DamageableSystem>().TryChangeDamage(uid, Damage, origin: userUid);
}
}