private void OnOpenSlotStorage(OpenSlotStorageNetworkMessage ev) { if (TryGetSlotEntity(ev.Uid, ev.Slot, out var entityUid) && TryComp <ServerStorageComponent>(entityUid, out var storageComponent)) { storageComponent.OpenStorageUI(ev.Uid); } }
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); } }