private void StringToHoloCacheList(string listString) { if (listString == null || listString == string.Empty) { Debug.Log("[OrX Target Manager] === HoloCache List string was empty or null ==="); return; } string[] teams = listString.Split(new char[] { ':' }); Debug.Log("[OrX Target Manager] Loading HoloCache Targets .........."); try { if (teams[0] != null && teams[0].Length > 0 && teams[0] != "null") { string[] teamACoords = teams[0].Split(new char[] { ';' }); for (int i = 0; i < teamACoords.Length; i++) { if (teamACoords[i] != null && teamACoords[i].Length > 0) { string[] data = teamACoords[i].Split(new char[] { ',' }); string name = data[0]; craftToSpawn = data[1]; sth = data[1]; double lat = double.Parse(data[3]); double longi = double.Parse(data[4]); double alt = double.Parse(data[5]); OrXHoloCacheinfo newInfo = new OrXHoloCacheinfo(new Vector3d(lat, longi, alt), craftToSpawn); HoloCacheTargets[OrXHoloCache.OrXCoords.Kerbin].Add(newInfo); } } } } catch (IndexOutOfRangeException e) { Debug.Log("[OrX Target Manager] HoloCache config file processed ...... "); } }
public bool EqualsTarget(OrXHoloCacheinfo other) { return(name == other.name && gpsCoordinates == other.gpsCoordinates && gpsVessel == other.gpsVessel); }