public static void UpdateSys(List <VisitedSystemsClass> visitedSystems, bool usedistancedb, bool matchsystems) // oldest system is lowest index { if (matchsystems) { SystemClass.FillVisitedSystems(visitedSystems); // first try and populate with SystemClass info } foreach (VisitedSystemsClass vsc in visitedSystems) { if (vsc.curSystem == null) // if no systemclass info, make a dummy { vsc.curSystem = new SystemClass(vsc.Name); if (vsc.HasTravelCoordinates) { vsc.curSystem.x = vsc.X; vsc.curSystem.y = vsc.Y; vsc.curSystem.z = vsc.Z; } } if (vsc.strDistance == null) { vsc.strDistance = ""; // set empty, must have a string in there. } } DistanceClass.FillVisitedSystems(visitedSystems, usedistancedb); // finally fill in the distances, indicating if can use db or not }