mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
20 lines
527 B
C#
20 lines
527 B
C#
using Robust.Shared.Physics.Events;
|
|
|
|
namespace Content.Shared.Physics;
|
|
|
|
public sealed partial class SharedPreventCollideSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<PreventCollideComponent, PreventCollideEvent>(OnPreventCollide);
|
|
}
|
|
|
|
private void OnPreventCollide(EntityUid uid, PreventCollideComponent component, ref PreventCollideEvent args)
|
|
{
|
|
if (component.Uid == args.OtherEntity)
|
|
args.Cancelled = true;
|
|
}
|
|
|
|
}
|