private void TransferHopperItems(Building_PocketDimensionEntranceBase otherSide) { for (int i = 0; i < AdjCellsCardinalInBounds.Count; i++) { Building_Storage hopper = null; List <Thing> thingList = AdjCellsCardinalInBounds[i].GetThingList(base.Map); for (int j = 0; j < thingList.Count; j++) { Thing thing = thingList[j]; if ((thing.def == ThingDefOf.Hopper || thing.def == PocketDimensionDefOf.CM_PocketDimensionHopper) && thing as MinifiedThing == null) { hopper = thing as Building_Storage; SlotGroup slotGroup = hopper.GetSlotGroup(); if (slotGroup != null && slotGroup.HeldThings != null) { foreach (Thing thing2 in slotGroup.HeldThings) { if (hopper.Accepts(thing2)) { thing2.DeSpawn(DestroyMode.Vanish); GenSpawn.Spawn(thing2, otherSide.InteractionCell, otherSide.Map, WipeMode.Vanish); } } } break; } } } }