示例#1
0
        private void OnOpenSlotStorage(OpenSlotStorageNetworkMessage ev, EntitySessionEventArgs args)
        {
            if (args.SenderSession.AttachedEntity is not EntityUid {
                Valid : true
            } uid)
            {
                return;
            }

            if (TryGetSlotEntity(uid, ev.Slot, out var entityUid) && TryComp <ServerStorageComponent>(entityUid, out var storageComponent))
            {
                _storageSystem.OpenStorageUI(entityUid.Value, uid, storageComponent);
            }
        }