/// <summary> /// generate the text for a travel mission detail /// </summary> /// <param name="mission">the mission</param> /// <returns>mission detail text</returns> private string GenerateMissionTravelDetail(MissionTravel mission) { StringBuilder sb = new StringBuilder(); sb.Clear(); sb.AppendLine("All Required Locations"); foreach (var location in mission.RequiredLocations) { sb.AppendLine(TAB + location.Name); } if (mission.Status == Mission.MissionStatus.Incomplete) { sb.AppendLine("Locations Yet to Visit"); foreach (var location in mission.LocationsNotCompleted(_player.LocationsVisited)) { sb.AppendLine(TAB + location.Name); } } sb.Remove(sb.Length - 2, 2); // remove the last two characters that generate a blank line return(sb.ToString());; }
private string GenerateMissionTravelDetail(MissionTravel mission) { StringBuilder sb = new StringBuilder(); sb.Clear(); sb.AppendLine("All Required Areas to Visit"); foreach (var location in mission.RequiredLocations) { sb.AppendLine(TAB + location.Name); } if (mission.Status == Mission.MissionStatus.Incomplete) { sb.AppendLine("Locations you still need"); foreach (var location in mission.LocationsNotCompleted(Player.LocationsVisited)) { sb.AppendLine(TAB + location.Name); } } sb.Remove(sb.Length - 2, 2); return(sb.ToString()); }