Files
OldThink/Content.Server/_White/Cult/Items/Systems/BloodBoilProjectileSystem.cs

28 lines
1008 B
C#
Raw Permalink Normal View History

using Content.Server._White.Cult.Items.Components;
using Content.Server._White.Cult.TimedProduction;
using Content.Shared._White.Cult.Components;
using Content.Shared._White.Cult.Pylon;
2024-01-28 09:18:18 +03:00
using Robust.Shared.Physics.Events;
2024-01-29 01:02:37 +07:00
using CultistComponent = Content.Shared._White.Cult.Components.CultistComponent;
2024-01-28 09:18:18 +03:00
namespace Content.Server._White.Cult.Items.Systems;
2024-01-28 09:18:18 +03:00
public sealed class BloodBoilProjectileSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<BloodBoilProjectileComponent, PreventCollideEvent>(PreventCollision);
}
private void PreventCollision(EntityUid uid, BloodBoilProjectileComponent component, ref PreventCollideEvent args)
{
if (HasComp<CultistComponent>(args.OtherEntity) || HasComp<ConstructComponent>(args.OtherEntity) ||
HasComp<CultistFactoryComponent>(args.OtherEntity) || HasComp<SharedPylonComponent>(args.OtherEntity))
{
args.Cancelled = true;
}
}
}