Example #1
0
 public override void OnUpdate()
 {
     try
     {
         body = FlightGlobals.currentMainBody.bodyName;
         lat  = Utilities.Rad2Lat(FlightGlobals.ship_latitude).ToString();
         lon  = Utilities.Rad2Lon(FlightGlobals.ship_longitude).ToString();
         var dn = RegolithResourceMap.GetDepletionNode(FlightGlobals.ship_latitude, FlightGlobals.ship_longitude);
         depNode = string.Format("x:{0}/y:{1}", dn.x, dn.y);
         var bmap = FlightGlobals.currentMainBody.BiomeMap;
         if (bmap != null)
         {
             var bdata = bmap.GetAtt(FlightGlobals.ship_latitude, FlightGlobals.ship_longitude);
             bioName = bdata.name;
         }
     }
     catch (Exception e)
     {
         //Swallow - probably a biome issue
     }
 }