6
StarHorizon_Public/Content.Shared/HotPotato/SharedHotPotatoSystem.cs
2025-08-13 15:03:01 +03:00

19 lines
499 B
C#

using Robust.Shared.Containers;
namespace Content.Shared.HotPotato;
public abstract class SharedHotPotatoSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<HotPotatoComponent, ContainerGettingRemovedAttemptEvent>(OnRemoveAttempt);
}
private void OnRemoveAttempt(EntityUid uid, HotPotatoComponent comp, ContainerGettingRemovedAttemptEvent args)
{
if (!comp.CanTransfer)
args.Cancel();
}
}