mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-16 21:17:39 +03:00
19 lines
499 B
C#
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();
|
|
}
|
|
}
|