using System; using System.Collections.Generic; namespace Hacknet.Mission { public static class BootLoadList { public static List getList() { return getListFromData(Utils.readEntireFile("Content/Computers/BootLoadList.txt")); } public static List getDemoList() { return getListFromData(Utils.readEntireFile("Content/Computers/DemoLoadList.txt")); } public static List getAdventureList() { return getListFromData(Utils.readEntireFile("Content/AdventureNetwork/AdventureLoadList.txt")); } private static List getListFromData(string data) { var separator = new string[2] { "\n\r", "\r\n" }; var strArray = data.Split(separator, StringSplitOptions.RemoveEmptyEntries); var list = new List(); for (var index = 0; index < strArray.Length; ++index) { if (!strArray[index].StartsWith("#") && strArray[index].Length > 1) list.Add(strArray[index]); } return list; } } }