fix feeding unremovable items (#21234)
This commit is contained in:
@@ -17,6 +17,7 @@ using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
@@ -101,6 +102,9 @@ public sealed class FoodSystem : EntitySystem
|
||||
if (!TryComp<BodyComponent>(target, out var body))
|
||||
return (false, false);
|
||||
|
||||
if (HasComp<UnremoveableComponent>(food))
|
||||
return (false, false);
|
||||
|
||||
if (_openable.IsClosed(food, user))
|
||||
return (false, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user