private void HandleAfterInteract(EntityUid uid, LightReplacerComponent component, AfterInteractEvent eventArgs)
        {
            if (eventArgs.Handled)
            {
                return;
            }

            // standard interaction checks
            if (!eventArgs.CanReach)
            {
                return;
            }

            // behaviour will depends on target type
            if (eventArgs.Target != null)
            {
                var targetUid = (EntityUid)eventArgs.Target;

                // replace broken light in fixture?
                if (EntityManager.TryGetComponent(targetUid, out PoweredLightComponent? fixture))
                {
                    eventArgs.Handled = TryReplaceBulb(uid, targetUid, eventArgs.User, component, fixture);
                }
                // add new bulb to light replacer container?
                else if (EntityManager.TryGetComponent(targetUid, out LightBulbComponent? bulb))
                {
                    eventArgs.Handled = TryInsertBulb(uid, targetUid, eventArgs.User, true, component, bulb);
                }
            }
        }
        private void HandleAfterInteract(EntityUid uid, LightReplacerComponent component, AfterInteractMessage eventArgs)
        {
            // standard interaction checks
            if (!ActionBlockerSystem.CanUse(eventArgs.User))
            {
                return;
            }
            if (!eventArgs.CanReach)
            {
                return;
            }

            // behaviour will depends on target type
            if (eventArgs.Attacked != null)
            {
                // replace broken light in fixture?
                if (eventArgs.Attacked.TryGetComponent(out PoweredLightComponent? fixture))
                {
                    component.TryReplaceBulb(fixture, eventArgs.User);
                }
                // add new bulb to light replacer container?
                else if (eventArgs.Attacked.TryGetComponent(out LightBulbComponent? bulb))
                {
                    component.TryInsertBulb(bulb, eventArgs.User, true);
                }
            }
        }
        private void HandleInteract(EntityUid uid, LightReplacerComponent component, InteractUsingEvent eventArgs)
        {
            if (eventArgs.Handled)
            {
                return;
            }

            // standard interaction checks
            if (!_blocker.CanInteract(eventArgs.User))
            {
                return;
            }

            var usedUid = eventArgs.Used;

            // want to insert a new light bulb?
            if (EntityManager.TryGetComponent(usedUid, out LightBulbComponent? bulb))
            {
                eventArgs.Handled = TryInsertBulb(uid, usedUid, eventArgs.User, true, component, bulb);
            }
            // add bulbs from storage?
            else if (EntityManager.TryGetComponent(usedUid, out ServerStorageComponent? storage))
            {
                eventArgs.Handled = TryInsertBulbsFromStorage(uid, usedUid, eventArgs.User, component, storage);
            }
        }
        private void HandleInteract(EntityUid uid, LightReplacerComponent component, InteractUsingMessage eventArgs)
        {
            // standard interaction checks
            if (!ActionBlockerSystem.CanInteract(eventArgs.User))
            {
                return;
            }

            if (eventArgs.ItemInHand != null)
            {
                // want to insert a new light bulb?
                if (eventArgs.ItemInHand.TryGetComponent(out LightBulbComponent? bulb))
                {
                    component.TryInsertBulb(bulb, eventArgs.User, true);
                }
                // add bulbs from storage?
                else if (eventArgs.ItemInHand.TryGetComponent(out ServerStorageComponent? storage))
                {
                    component.TryInsertBulb(storage, eventArgs.User);
                }
            }
        }
 private void OnInit(EntityUid uid, LightReplacerComponent replacer, ComponentInit args)
 {
     replacer.InsertedBulbs = ContainerHelpers.EnsureContainer <Container>(replacer.Owner, "light_replacer_storage");
 }