Remove ranged injection/feeding (#9841)

This commit is contained in:
Rane
2022-07-17 18:25:41 -04:00
committed by GitHub
parent 2419950751
commit 5ad725dce9
4 changed files with 0 additions and 56 deletions

View File

@@ -1,31 +0,0 @@
using Content.Server.Nutrition.Components;
using Content.Shared.Throwing;
namespace Content.Server.Nutrition.EntitySystems
{
public sealed class ForcefeedOnCollideSystem : EntitySystem
{
[Dependency] private readonly FoodSystem _foodSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ForcefeedOnCollideComponent, ThrowDoHitEvent>(OnThrowDoHit);
SubscribeLocalEvent<ForcefeedOnCollideComponent, LandEvent>(OnLand);
}
private void OnThrowDoHit(EntityUid uid, ForcefeedOnCollideComponent component, ThrowDoHitEvent args)
{
_foodSystem.ProjectileForceFeed(uid, args.Target, args.User);
}
private void OnLand(EntityUid uid, ForcefeedOnCollideComponent component, LandEvent args)
{
if (!component.RemoveOnThrowEnd)
return;
EntityManager.RemoveComponent(uid, component);
}
}
}