18
Content.Shared/HotPotato/SharedHotPotatoSystem.cs
Normal file
18
Content.Shared/HotPotato/SharedHotPotatoSystem.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user