Moved Food and Utensil to ECS (#5380)

* Food and Utensil to ECS, Made utensil less restrictive, no more soup eating with a knife...

* AltVerb "can eat" check

* removed HasFlag calls

* AltActionVerb -> InteractionVerb

* "required utensil" filed
This commit is contained in:
FoLoKe
2021-11-21 10:35:09 +03:00
committed by GitHub
parent 1ab7170adb
commit 24aca21eb6
8 changed files with 337 additions and 256 deletions

View File

@@ -1,11 +1,14 @@
using Content.Server.Nutrition.Components;
using Content.Server.Nutrition.Components;
using Content.Shared.Throwing;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server.Nutrition.EntitySystems
{
public class ForcefeedOnCollideSystem : EntitySystem
{
[Dependency] private readonly FoodSystem _foodSystem = default!;
public override void Initialize()
{
base.Initialize();
@@ -22,7 +25,7 @@ namespace Content.Server.Nutrition.EntitySystems
return;
// the 'target' isnt really the 'user' per se.. but..
food.TryUseFood(args.Target, args.Target);
_foodSystem.TryUseFood(food.OwnerUid, args.Target.Uid, args.Target.Uid);
}
private void OnLand(EntityUid uid, ForcefeedOnCollideComponent component, LandEvent args)