public static Thing FirstBlockingThing(Thing constructible, Pawn pawnToIgnore) { Blueprint blueprint = constructible as Blueprint; Thing thing; if (blueprint != null) { thing = GenConstruct.MiniToInstallOrBuildingToReinstall(blueprint); } else { thing = null; } CellRect.CellRectIterator iterator = constructible.OccupiedRect().GetIterator(); while (!iterator.Done()) { List <Thing> thingList = iterator.Current.GetThingList(constructible.Map); for (int i = 0; i < thingList.Count; i++) { Thing thing2 = thingList[i]; if (GenConstruct.BlocksConstruction(constructible, thing2) && thing2 != pawnToIgnore && thing2 != thing) { return(thing2); } } iterator.MoveNext(); } return(null); }