Remove ranged injection/feeding (#9841)
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
|
||||
namespace Content.Server.Nutrition.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// A food item with this component will be forcefully fed to anyone
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(ForcefeedOnCollideSystem))]
|
||||
public sealed class ForcefeedOnCollideComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Since this component is primarily used by the pneumatic cannon, which adds this comp on throw start
|
||||
/// and wants to remove it on throw end, this is set to false. However, you're free to change it if you want
|
||||
/// something that can -always- be forcefed on collide, or something.
|
||||
/// </summary>
|
||||
[DataField("removeOnThrowEnd")]
|
||||
public bool RemoveOnThrowEnd = true;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,9 +236,6 @@ namespace Content.Server.PneumaticCannon
|
||||
|
||||
_throwingSystem.TryThrow(ent, data.Direction, data.Strength, data.User, GetPushbackRatioFromPower(comp.Power));
|
||||
|
||||
// lasagna, anybody?
|
||||
ent.EnsureComponent<ForcefeedOnCollideComponent>();
|
||||
|
||||
if(EntityManager.TryGetComponent<StatusEffectsComponent?>(data.User, out var status)
|
||||
&& comp.Power == PneumaticCannonPower.High)
|
||||
{
|
||||
|
||||
@@ -114,9 +114,6 @@
|
||||
- state: tin
|
||||
- state: plain
|
||||
- type: CreamPie
|
||||
- type: SolutionInjectOnCollide
|
||||
transferAmount: 20
|
||||
transferEfficiency: 0.2
|
||||
# Tastes like pie, cream, banana.
|
||||
|
||||
- type: entity
|
||||
|
||||
Reference in New Issue
Block a user