public static bool CanPlaceThing(this IntVec3 position, [NotNull] Thing thing) { var quality = GenPlace.PlaceSpotQualityAt(position, thing, position); if (quality >= PlaceSpotQuality.Okay) { return(true); } var slotGroup = Find.ThingGrid.ThingAt(position, EntityCategory.Building) as SlotGroupParent; if (slotGroup != null) { return(slotGroup.GetStoreSettings().AllowedToAccept(thing)); } return(false); }