Openable refactor (#19750)
This commit is contained in:
@@ -5,7 +5,7 @@ using Content.Shared.Item;
|
||||
using Content.Shared.Glue;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Nutrition.Components;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Hands;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -26,7 +26,7 @@ public sealed class GlueSystem : SharedGlueSystem
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<GlueComponent, AfterInteractEvent>(OnInteract);
|
||||
SubscribeLocalEvent<GlueComponent, AfterInteractEvent>(OnInteract, after: new[] { typeof(OpenableSystem) });
|
||||
SubscribeLocalEvent<GluedComponent, ComponentInit>(OnGluedInit);
|
||||
SubscribeLocalEvent<GluedComponent, GotEquippedHandEvent>(OnHandPickUp);
|
||||
}
|
||||
@@ -40,11 +40,6 @@ public sealed class GlueSystem : SharedGlueSystem
|
||||
if (!args.CanReach || args.Target is not { Valid: true } target)
|
||||
return;
|
||||
|
||||
if (TryComp<DrinkComponent>(uid, out var drink) && !drink.Opened)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (TryGlue(uid, component, target, args.User))
|
||||
{
|
||||
args.Handled = true;
|
||||
|
||||
Reference in New Issue
Block a user