using Content.Server.Light.Components; using Content.Shared.Interaction; using Content.Shared.Smoking; using Robust.Shared.GameObjects; using Robust.Shared.IoC; namespace Content.Server.Light.EntitySystems { public class MatchboxSystem : EntitySystem { public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnInteractUsing); } private void OnInteractUsing(EntityUid uid, MatchboxComponent component, InteractUsingEvent args) { if (!args.Handled && EntityManager.TryGetComponent(args.Used, out var matchstick) && matchstick.CurrentState == SmokableState.Unlit) { Get().Ignite(matchstick, args.User); args.Handled = true; } } } }