]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix moth z on clothes eating (#20456)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sun, 24 Sep 2023 20:49:58 +0000 (21:49 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Sep 2023 20:49:58 +0000 (16:49 -0400)
Content.Server/Nutrition/EntitySystems/FoodSystem.cs

index f1a4a6d5f43928602306a615791c14a29cd5af85..af037187408103d26a87696faa0cb51f226eb28d 100644 (file)
@@ -2,6 +2,7 @@ using System.Linq;
 using Content.Server.Body.Components;
 using Content.Server.Body.Systems;
 using Content.Server.Chemistry.EntitySystems;
+using Content.Server.Inventory;
 using Content.Server.Nutrition.Components;
 using Content.Server.Popups;
 using Content.Server.Stack;
@@ -61,7 +62,7 @@ public sealed class FoodSystem : EntitySystem
 
         // TODO add InteractNoHandEvent for entities like mice.
         // run after openable for wrapped/peelable foods
-        SubscribeLocalEvent<FoodComponent, UseInHandEvent>(OnUseFoodInHand, after: new[] { typeof(OpenableSystem) });
+        SubscribeLocalEvent<FoodComponent, UseInHandEvent>(OnUseFoodInHand, after: new[] { typeof(OpenableSystem), typeof(ServerInventorySystem) });
         SubscribeLocalEvent<FoodComponent, AfterInteractEvent>(OnFeedFood);
         SubscribeLocalEvent<FoodComponent, GetVerbsEvent<AlternativeVerb>>(AddEatVerb);
         SubscribeLocalEvent<FoodComponent, ConsumeDoAfterEvent>(OnDoAfter);