]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix feeding unremovable items (#21234)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Wed, 25 Oct 2023 04:51:32 +0000 (00:51 -0400)
committerGitHub <noreply@github.com>
Wed, 25 Oct 2023 04:51:32 +0000 (21:51 -0700)
Content.Server/Nutrition/EntitySystems/FoodSystem.cs

index 8406ce222d8c677a5263825fa75ae97730da360d..ff4ec41dd99ceeec2fdbc88ebdb108b22f24b975 100644 (file)
@@ -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);