//A simple check to see if the specified planets match the active vessel's current planet internal static bool planetConfirm(int pMask, bool t) { DMPlanetaryIndicesGen index = new DMPlanetaryIndicesGen(); if (t && DMAsteroidScienceGen.AsteroidGrappled || t && DMAsteroidScienceGen.AsteroidNear) { index = planetIndex(100); } else { index = planetIndex(FlightGlobals.ActiveVessel.mainBody.flightGlobalsIndex); } DMPlanetaryIndicesGen mask = (DMPlanetaryIndicesGen)pMask; if ((mask & index) == index) { return(true); } else { return(false); } }
//A simple check to see if the specified planets match the active vessel's current planet internal static bool planetConfirm(int pMask, bool t) { DMPlanetaryIndicesGen index = new DMPlanetaryIndicesGen(); if (t && DMAsteroidScienceGen.AsteroidGrappled || t && DMAsteroidScienceGen.AsteroidNear) index = planetIndex(100); else index = planetIndex(FlightGlobals.ActiveVessel.mainBody.flightGlobalsIndex); DMPlanetaryIndicesGen mask = (DMPlanetaryIndicesGen)pMask; if ((mask & index) == index) return true; else return false; }