private static string LoadAndTestOS(ScreenManager screenMan, out int errorsAdded) { int errorCount = 0; string str1 = ""; string username = "******"; string pass = "******"; SaveFileManager.AddUser(username, pass); string fileNameForUsername = SaveFileManager.GetSaveFileNameForUsername(username); OS.TestingPassOnly = true; OS os1 = new OS(); os1.SaveGameUserName = fileNameForUsername; os1.SaveUserAccountName = username; screenMan.AddScreen((GameScreen)os1, new PlayerIndex?(screenMan.controllingPlayer)); SessionAccelerator.AccelerateSessionToDLCEND((object)os1); os1.PreDLCVisibleNodesCache = "123,456,789"; os1.delayer.RunAllDelayedActions(); os1.threadedSaveExecute(false); List <Computer> nodes = os1.netMap.nodes; screenMan.RemoveScreen((GameScreen)os1); OS.WillLoadSave = true; OS os2 = new OS(); os2.SaveGameUserName = fileNameForUsername; os2.SaveUserAccountName = username; screenMan.AddScreen((GameScreen)os2, new PlayerIndex?(screenMan.controllingPlayer)); os2.delayer.RunAllDelayedActions(); Game1.getSingleton().IsMouseVisible = true; if (os2.PreDLCVisibleNodesCache != "123,456,789") { ++errorCount; str1 += "PreDLC Visible Node Cache not saving correctly"; } screenMan.RemoveScreen((GameScreen)os2); string str2 = str1 + TestSuite.getTestingReportForLoadComparison((object)os2, nodes, errorCount, out errorCount) + "\r\n" + TestSuite.TestMissions((object)os2); string str3 = DLCTests.TestDLCFunctionality(screenMan, out errorsAdded); string str4 = str2 + (str3.Length > 30 ? "\r\n" + str3 : ""); errorsAdded = errorCount; return(str4); }
public static string TestDLCProgression(ScreenManager screenMan, out int errorsAdded) { int errors = 0; string ret = ""; DLCTests.SetupTestingEnvironment(screenMan, (Action <OS, List <Computer> >)((os, comps) => { Console.WriteLine("Testing DLC Progression in " + Settings.ActiveLocale); SessionAccelerator.AccelerateSessionToDLCEND((object)os); if (Programs.getComputer(os, "dhsDrop").files.root.searchForFolder("home").searchForFile("p_SQL_399.gz") == null) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nExpo Grave Mission files not copied over to drop server! Mission Incompletable."; } if (!Programs.getComputer(os, "ds4_expo").ports.Contains(21)) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nExpo Grave Website does not have port 21 added! Mission Incompletable."; } Folder folder = Programs.getComputer(os, "ds3_mail").files.root.searchForFolder("mail").searchForFolder("accounts").searchForFolder("cornch1p"); if (folder == null) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nMagma Mailbox server for It Follows (set3) does not have account! in file, replace kburnaby with cornch1p to fix."; } else if (folder.searchForFolder("inbox").files.Count <= 0) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nMagma Mailbox server for It Follows (set3) does not have emails! in file, replace kburnaby with cornch1p to fix."; } CustomFaction fromFile = CustomFaction.ParseFromFile("Content/DLC/DLCFaction.xml"); if (fromFile.idName != "Bibliotheque") { ++errors; // ISSUE: variable of a compiler-generated type DLCTests.\u003C\u003Ec__DisplayClass7 cDisplayClass7 = this; // ISSUE: reference to a compiler-generated field string str = cDisplayClass7.ret + "\r\nHub Faction ID Name is wrong: " + fromFile.idName; // ISSUE: reference to a compiler-generated field cDisplayClass7.ret = str; } CustomFactionAction customAction = fromFile.CustomActions[6]; for (int index = 0; index < customAction.TriggerActions.Count; ++index) { SAAddConditionalActions triggerAction = customAction.TriggerActions[index] as SAAddConditionalActions; if (triggerAction != null && triggerAction.Filepath.Contains("PetsAcceptedActions")) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nHub Faction (stage 7) contains PetsAcceptedActions.xml loader - it should be only on the mission itself! Remove it!"; } } if (Programs.getComputer(os, "dPets_MF").name.ToLower().Contains("digipets")) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nNeopals server rename from DigiPets is not complete in this version! Fix it! Remember to do foldernames too.\r\n"; } bool flag = false; Computer computer = Programs.getComputer(os, "dMF_1_Misc"); for (int index = 0; index < computer.users.Count; ++index) { if (computer.users[index].name == "listen" && computer.users[index].pass == "4TL4S") { flag = true; } } if (!flag) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nAtlas server (MemForensics/Atlas) needs user listen w. pass 4TL4S\r\n"; } if (((ActiveMission)ComputerLoader.readMission("Content/DLC/Missions/Neopals/PetsMission1.xml")).email.body.Contains("DigiPoints")) { ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nNeopals missions references DigiPoints, where it should be NeoPoints! Remember to check the goals field!\r\n"; } if (Programs.getComputer(os, "dhsDrop").admin == null) { return; } ++errors; // ISSUE: reference to a compiler-generated field this.ret += "\r\nDLC Drop server has an admin - remove it with type=none. This stops the player being auto logged out.\r\n"; })); errorsAdded = errors; return(ret); }