public string GetBiomeString() { string biome_desc = ""; CBAttributeMap.MapAttribute mapAttribute; try { CBAttributeMap BiomeMap = ActiveVessel.mainBody.BiomeMap; double lat = ActiveVessel.latitude * Math.PI / 180d; double lon = ActiveVessel.longitude * Math.PI / 180d; mapAttribute = BiomeMap.GetAtt(lat, lon); biome_desc = mapAttribute.name; } catch (NullReferenceException) { mapAttribute = new CBAttributeMap.MapAttribute(); mapAttribute.name = "N/A"; } return(biome_desc); }
public CBAttributeMap.MapAttribute GetBiome() { CBAttributeMap.MapAttribute mapAttribute; try { CBAttributeMap BiomeMap = ActiveVessel.mainBody.BiomeMap; double lat = ActiveVessel.latitude * Math.PI / 180d; double lon = ActiveVessel.longitude * Math.PI / 180d; mapAttribute = BiomeMap.GetAtt(lat, lon); } catch (NullReferenceException) { mapAttribute = new CBAttributeMap.MapAttribute(); mapAttribute.name = "N/A"; } return(mapAttribute); }