diff --git a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.Blockers.cs b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.Blockers.cs index e1bd480bcc..3e7c9da122 100644 --- a/Content.Shared/Nutrition/EntitySystems/IngestionSystem.Blockers.cs +++ b/Content.Shared/Nutrition/EntitySystems/IngestionSystem.Blockers.cs @@ -7,6 +7,7 @@ using Content.Shared.Interaction.Components; using Content.Shared.Inventory; using Content.Shared.Nutrition.Components; using Content.Shared.Storage; +using Content.Shared.Weapons.Ranged.Systems; namespace Content.Shared.Nutrition.EntitySystems; @@ -117,7 +118,10 @@ public sealed partial class IngestionSystem private void OnOpenableEdible(Entity ent, ref EdibleEvent args) { - if (_openable.IsClosed(ent, args.User, ent.Comp)) + if (args.Cancelled) + return; + + if (_openable.IsClosed(ent, args.User, ent.Comp, predicted: true)) args.Cancelled = true; } diff --git a/Content.Shared/Nutrition/EntitySystems/OpenableSystem.cs b/Content.Shared/Nutrition/EntitySystems/OpenableSystem.cs index 588875d553..04d3c20a3f 100644 --- a/Content.Shared/Nutrition/EntitySystems/OpenableSystem.cs +++ b/Content.Shared/Nutrition/EntitySystems/OpenableSystem.cs @@ -104,7 +104,7 @@ public sealed partial class OpenableSystem : EntitySystem Text = Loc.GetString(comp.CloseVerbText), Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/close.svg.192dpi.png")), Act = () => TryClose(args.Target, comp, args.User), - // this verb is lower priority than drink verb (2) so it doesn't conflict + Priority = 3 }; } else @@ -113,7 +113,8 @@ public sealed partial class OpenableSystem : EntitySystem { Text = Loc.GetString(comp.OpenVerbText), Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/open.svg.192dpi.png")), - Act = () => TryOpen(args.Target, comp, args.User) + Act = () => TryOpen(args.Target, comp, args.User), + Priority = 3 }; } args.Verbs.Add(verb);