using Content.Server.Flash.Components; using Content.Server.Store.Components; using Content.Shared._White.Overlays; using Content.Shared.Changeling; using Content.Shared.Eye.Blinding.Components; using Content.Shared.Implants.Components; using Content.Shared.Inventory; namespace Content.Server.Changeling; public sealed partial class ChangelingSystem { private void InitializeShop() { SubscribeLocalEvent(OnShop); SubscribeLocalEvent(OnChangelingRefund); SubscribeLocalEvent>(OnRefund); } private void OnRefund(Entity ent, ref InventoryRelayedEvent args) { QueueDel(ent); } private void OnChangelingRefund(Entity ent, ref ChangelingRefundEvent args) { RemComp(ent); RemComp(ent); RemComp(ent); RemComp(ent); RemComp(ent); foreach (var hand in _handsSystem.EnumerateHands(ent)) { if (hand.HeldEntity != null && HasComp(hand.HeldEntity.Value)) QueueDel(hand.HeldEntity.Value); } if (!TryComp(args.Store, out StoreComponent? storeComponent)) return; _storeSystem.DisableRefund(args.Store, storeComponent); } private void OnShop(EntityUid uid, SubdermalImplantComponent component, ChangelingShopActionEvent args) { if (!TryComp(uid, out var store)) return; _storeSystem.ToggleUi(args.Performer, uid, store); } }