main cult
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Content.Shared.Mobs;
|
||||
|
||||
namespace Content.Server.White.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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user