Files
tbd-station-14/Content.Shared/Strip/ThievingSystem.cs
Krunklehorn 41ca8f3dfc StrippableSystem doafter overhaul (#25994)
* Initial commit

* Fixed short circuiting

* Use DebugTools

* Use Entity<TComp> more, and make them nullable

* Bring these two together
2024-03-15 13:57:52 +11:00

24 lines
690 B
C#

using Content.Shared.Inventory;
using Content.Shared.Strip;
using Content.Shared.Strip.Components;
namespace Content.Shared.Strip;
public sealed class ThievingSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ThievingComponent, BeforeStripEvent>(OnBeforeStrip);
SubscribeLocalEvent<ThievingComponent, InventoryRelayedEvent<BeforeStripEvent>>((e, c, ev) => OnBeforeStrip(e, c, ev.Args));
}
private void OnBeforeStrip(EntityUid uid, ThievingComponent component, BeforeStripEvent args)
{
args.Stealth |= component.Stealthy;
args.Additive -= component.StripTimeReduction;
}
}