public static void GetOutdoorTemp(ref float __result, Map ___map) { MapParent_PocketDimension mapParent = ___map.info.parent as MapParent_PocketDimension; if (mapParent != null) { Building_PocketDimensionEntranceBase box = PocketDimensionUtility.GetBox(mapParent.dimensionSeed); if (box != null) { __result = 21.0f; if (box.Spawned) { __result = GenTemperature.GetTemperatureForCell(box.Position, box.Map); } else if (box.ParentHolder != null) { for (IThingHolder parentHolder = box.ParentHolder; parentHolder != null; parentHolder = parentHolder.ParentHolder) { if (ThingOwnerUtility.TryGetFixedTemperature(parentHolder, box, out __result)) { return;// false; } } } else if (box.SpawnedOrAnyParentSpawned) { __result = GenTemperature.GetTemperatureForCell(box.PositionHeld, box.MapHeld); } else if (box.Tile >= 0) { __result = GenTemperature.GetTemperatureFromSeasonAtTile(GenTicks.TicksAbs, box.Tile); } // Above logic derived from the following function call. Can't call it here due to an edge case which results in infinite loop //__result = box.AmbientTemperature; return;// false; } } //return true; }