egg rework (#21606)

* egg and raw egg

* add DamageEntity

* boiling and exploding eggs

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-11-12 23:18:48 +00:00
committed by GitHub
parent e22675b07a
commit 60c19853cd
9 changed files with 121 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
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);
}
}