From 2f0c85f1f8307c95e53a6f2a364bca13c22d814c Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Thu, 9 Jun 2022 14:39:29 +1200 Subject: [PATCH] fix match-matchbox interaction (#8715) --- Content.Server/Light/EntitySystems/MatchboxSystem.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Server/Light/EntitySystems/MatchboxSystem.cs b/Content.Server/Light/EntitySystems/MatchboxSystem.cs index 362139f4bf..e7b0fe4aad 100644 --- a/Content.Server/Light/EntitySystems/MatchboxSystem.cs +++ b/Content.Server/Light/EntitySystems/MatchboxSystem.cs @@ -1,4 +1,5 @@ using Content.Server.Light.Components; +using Content.Server.Storage.EntitySystems; using Content.Shared.Interaction; using Content.Shared.Smoking; @@ -6,10 +7,12 @@ namespace Content.Server.Light.EntitySystems { public sealed class MatchboxSystem : EntitySystem { + [Dependency] private readonly MatchstickSystem _stickSystem = default!; + public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnInteractUsing); + SubscribeLocalEvent(OnInteractUsing, before: new[] { typeof(StorageSystem) }); } private void OnInteractUsing(EntityUid uid, MatchboxComponent component, InteractUsingEvent args) @@ -18,7 +21,7 @@ namespace Content.Server.Light.EntitySystems && EntityManager.TryGetComponent(args.Used, out var matchstick) && matchstick.CurrentState == SmokableState.Unlit) { - Get().Ignite(matchstick, args.User); + _stickSystem.Ignite(matchstick, args.User); args.Handled = true; } }