fish-station/Content.Server/_Sunrise/BecomeDustOnDeathSystem/BecomeDustOnDeathSystem.cs
Vigers Ray 014e6ac131
Культ крови (#847)
Signed-off-by: pacable <igor.mamaev1@gmail.com>
Co-authored-by: pacable <igor.mamaev1@gmail.com>
Co-authored-by: Babaev <129369024+babaevlsdd@users.noreply.github.com>
2025-03-29 14:46:54 +03:00

19 lines
557 B
C#

using Content.Shared.Mobs;
namespace Content.Server._Sunrise.BecomeDustOnDeathSystem;
public sealed class BecomeDustOnDeathSystem : EntitySystem
{
public override void Initialize()
{
SubscribeLocalEvent<BecomeDustOnDeathComponent, MobStateChangedEvent>(OnMobStateChanged);
}
private void OnMobStateChanged(EntityUid uid, BecomeDustOnDeathComponent component, MobStateChangedEvent args)
{
var xform = Transform(uid);
Spawn(component.SpawnOnDeathPrototype, xform.Coordinates);
QueueDel(uid);
}
}