diff --git a/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs b/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs index 43087214a453d5..d40288183fcb02 100644 --- a/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs @@ -31,24 +31,24 @@ public override void Initialize() /// /// Clicked with utensil /// - private void OnAfterInteract(EntityUid uid, UtensilComponent component, AfterInteractEvent ev) + private void OnAfterInteract(Entity entity, ref AfterInteractEvent ev) { if (ev.Handled || ev.Target == null || !ev.CanReach) return; - var result = TryUseUtensil(ev.User, ev.Target.Value, component); + var result = TryUseUtensil(ev.User, ev.Target.Value, entity); ev.Handled = result.Handled; } - public (bool Success, bool Handled) TryUseUtensil(EntityUid user, EntityUid target, UtensilComponent component) + public (bool Success, bool Handled) TryUseUtensil(EntityUid user, EntityUid target, Entity utensil) { if (!EntityManager.TryGetComponent(target, out FoodComponent? food)) return (false, true); //Prevents food usage with a wrong utensil - if ((food.Utensil & component.Types) == 0) + if ((food.Utensil & utensil.Comp.Types) == 0) { - _popupSystem.PopupEntity(Loc.GetString("food-system-wrong-utensil", ("food", target), ("utensil", component.Owner)), user, user); + _popupSystem.PopupEntity(Loc.GetString("food-system-wrong-utensil", ("food", target), ("utensil", utensil.Owner)), user, user); return (false, true); }