Example #1
0
 public override void OnUpdate()
 {
     ORSPlanetaryResourceMapData.updatePlanetaryResourceMap();
     if (resourceInfo == null)
     {
         if (ORSPlanetaryResourceMapData.getPlanetaryResourceMapData.ContainsKey(resourceName))
         {
             resourceInfo = ORSPlanetaryResourceMapData.getPlanetaryResourceMapData[resourceName];
         }
     }
     Events["DisplayResource"].active  = Events["DisplayResource"].guiActive = !ORSPlanetaryResourceMapData.resourceIsDisplayed(resourceName) && mapViewAvailable;
     Events["DisplayResource"].guiName = "Display " + resourceName + " hotspots";
     Events["HideResource"].active     = Events["HideResource"].guiActive = ORSPlanetaryResourceMapData.resourceIsDisplayed(resourceName) && mapViewAvailable;
     Events["HideResource"].guiName    = "Hide " + resourceName + " hotspots";
     Fields["Ab"].guiName = resourceName + " abundance";
     if (resourceInfo != null)
     {
         if (resourceInfo.getResourceScale() == 1)
         {
             Ab = (abundance * 100.0).ToString("0.00") + "%";
         }
         else
         {
             Ab = (abundance * 1000000.0).ToString("0.0") + "ppm";
         }
     }
     else
     {
         Ab = "Broken:(";
     }
 }
 public override void OnUpdate()
 {
     Events["DisplayResource"].active  = Events["DisplayResource"].guiActive = !ORSPlanetaryResourceMapData.resourceIsDisplayed(resourceName) && mapViewAvailable;
     Events["DisplayResource"].guiName = "Display " + resourceName + " hotspots";
     Events["HideResource"].active     = Events["HideResource"].guiActive = ORSPlanetaryResourceMapData.resourceIsDisplayed(resourceName) && mapViewAvailable;
     Events["HideResource"].guiName    = "Hide " + resourceName + " hotspots";
     Fields["Ab"].guiName = resourceName + " abundance";
     if (abundance > 0.001)
     {
         Ab = (abundance * 100.0).ToString("0.00") + "%";
     }
     else
     {
         Ab = (abundance * 1000000.0).ToString("0.0") + "ppm";
     }
     ORSPlanetaryResourceMapData.updatePlanetaryResourceMap();
 }