public static void Postfix(BuildingDef __instance, int cell, Orientation orientation, ObjectLayer layer, GameObject go) { foreach (PortDisplay2 portDisplay in __instance.BuildingComplete.GetComponents <PortDisplay2>()) { ConduitType secondaryConduitType2 = portDisplay.type; ObjectLayer objectLayerForConduitType4 = Grid.GetObjectLayerForConduitType(secondaryConduitType2); CellOffset rotatedCellOffset8 = Rotatable.GetRotatedCellOffset(portDisplay.offset, orientation); int cell11 = Grid.OffsetCell(cell, rotatedCellOffset8); __instance.MarkOverlappingPorts(Grid.Objects[cell11, (int)objectLayerForConduitType4], go); Grid.Objects[cell11, (int)objectLayerForConduitType4] = go; } }