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:
23
Content.Server/Construction/Completions/DamageEntity.cs
Normal file
23
Content.Server/Construction/Completions/DamageEntity.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user