fish-station/Content.Server/_Sunrise/Cleaning/FoorprintAreaCleaningSystem.cs
pacable 343c84cfab
Теперь проще убирать следы (#720)
* Теперь проще убирать следы

Signed-off-by: pacable <igor.mamaev1@gmail.com>

* чистобот чистит грязь лучше

Signed-off-by: pacable <igor.mamaev1@gmail.com>

* Revert "добавление возможности выключать следы (#655)"

This reverts commit ae78fa10

Signed-off-by: pacable <igor.mamaev1@gmail.com>

* postfix

Signed-off-by: pacable <igor.mamaev1@gmail.com>

* исправление чистящих гранат по отношению к следам

Signed-off-by: pacable <igor.mamaev1@gmail.com>

---------

Signed-off-by: pacable <igor.mamaev1@gmail.com>
2024-12-01 17:53:44 +03:00

24 lines
714 B
C#

using Content.Shared._Sunrise.Footprints;
using Robust.Shared.Physics.Events;
namespace Content.Server._Sunrise.Cleaning;
public sealed class FoorprintAreaCleaningSystem : EntitySystem
{
[Dependency] private readonly EntityManager _entMan = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<FootprintAreaCleanerComponent, StartCollideEvent>(OnCollide);
}
private void OnCollide(EntityUid uid, FootprintAreaCleanerComponent component, StartCollideEvent args)
{
if (!TryComp<FootprintComponent>(args.OtherEntity, out _) || !component.Enabled)
return;
_entMan.QueueDeleteEntity(args.OtherEntity);
}
}