RemoteTech.RTUtils.targetName C# (CSharp) Méthode

targetName() public static méthode

public static targetName ( string ident ) : string
ident string
Résultat string
        public static string targetName(string ident)
        {
            if (ident.Equals("Mission Control"))
                return ident;

            foreach (CelestialBody bodies in FlightGlobals.Bodies)
                if (bodies.name.ToLower().Equals(ident.ToLower()))
                    return bodies.theName;

            foreach (Vessel v in FlightGlobals.Vessels)
                if (v.id.ToString().Equals(ident))
                    return v.vesselName;

            return "None";
        }