public override void disconnectionDetected(Computer c, OS os) { base.disconnectionDetected(c, os); for (int index = 0; index < c.ports.Count; ++index) { c.closePort(c.ports[index], "LOCAL_ADMIN"); } if (c.firewall != null) { c.firewall.resetSolutionProgress(); c.firewall.solved = false; } if (c.hasProxy) { c.proxyActive = true; c.proxyOverloadTicks = c.startingOverloadTicks; } Action action = (Action)(() => { if (os.connectedComp != null && !(os.connectedComp.ip != c.ip)) { return; } for (int index = 0; index < c.ports.Count; ++index) { c.closePort(c.ports[index], "LOCAL_ADMIN"); } if (this.ResetsPassword) { c.setAdminPassword(PortExploits.getRandomPassword()); } c.adminIP = c.ip; if (c.firewall != null) { c.firewall.resetSolutionProgress(); } }); action(); double time; if (c.securityLevel == 0) { time = 60; } else if (c.securityLevel == 2) { time = 50.5; } else if (c.securityLevel == 4) { time = 25; } else { time = 10; } os.delayer.Post(ActionDelayer.Wait(time), action); os.timerExpired(); }
public static void AccelerateSessionToDLCStart(object osObj) { OS os = (OS)osObj; os.Flags.AddFlag("TutorialComplete"); os.delayer.RunAllDelayedActions(); ThemeManager.setThemeOnComputer((object)os.thisComputer, "DLC/Themes/RiptideClassicTheme.xml"); ThemeManager.switchTheme((object)os, "DLC/Themes/RiptideClassicTheme.xml"); for (int index1 = 0; index1 < 60; ++index1) { int index2; do { index2 = Utils.random.Next(os.netMap.nodes.Count); }while (os.netMap.nodes[index2].idName == "mainHub" || os.netMap.nodes[index2].idName == "entropy00" || os.netMap.nodes[index2].idName == "entropy01"); os.netMap.discoverNode(os.netMap.nodes[index2]); } os.netMap.lastAddedNode = os.thisComputer; os.delayer.Post(ActionDelayer.Wait(0.15), (Action)(() => { Game1.getSingleton().IsMouseVisible = true; os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[22], "SSHCrack.exe")); os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[21], "FTPBounce.exe")); os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[13], "eosDeviceScan.exe")); MissionFunctions.runCommand(7, "changeSong"); MusicManager.stop(); })); os.delayer.Post(ActionDelayer.Wait(56.0), (Action)(() => ComputerLoader.loadMission("Content/DLC/Missions/Demo/DLCDemoIntroMission1.xml", false))); }
public override void disconnectionDetected(Computer c, OS os) { base.disconnectionDetected(c, os); var time = 20.0 * Utils.random.NextDouble(); os.delayer.Post(ActionDelayer.Wait(time), () => { if (os.connectedComp != null && !(os.connectedComp.ip != c.ip)) { return; } for (var index = 0; index < c.ports.Count; ++index) { c.closePort(c.ports[index], "LOCAL_ADMIN"); } if (ResetsPassword) { c.setAdminPassword(PortExploits.getRandomPassword()); } c.adminIP = c.ip; if (c.firewall == null) { return; } c.firewall.solved = false; c.firewall.resetSolutionProgress(); }); }
private void DrawWarningScreen() { if (this.warningScreenIsActivating) { this.spriteBatch.Draw(Utils.white, this.fullscreen, Color.White); } else { this.DrawFlashingRedBackground(); } string text = "WARNING"; Vector2 vector2_1 = this.titleFont.MeasureString(text); float widthTo = (float)this.fullscreen.Width * 0.65f; float scale = widthTo / vector2_1.X; Vector2 vector2_2 = new Vector2(20f, -10f); this.spriteBatch.DrawString(this.titleFont, text, vector2_2, Color.Black, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.5f); vector2_2.Y += (float)((double)vector2_1.Y * (double)scale - 55.0); TextItem.doFontLabel(vector2_2, LocaleTerms.Loc("COMPLETED TRACE DETECTED : EMERGENCY RECOVERY MODE ACTIVE"), Settings.ActiveLocale.StartsWith("en") ? this.titleFont : GuiData.font, new Color?(Color.Black), widthTo, float.MaxValue, false); vector2_2.Y += 40f; vector2_2 = this.DrawFlashInString(LocaleTerms.Loc("Unsyndicated foreign connection detected during active trace"), vector2_2, 0.0f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(" :: " + LocaleTerms.Loc("Emergency recovery mode activated"), vector2_2, 0.1f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString("-----------------------------------------------------------------------", vector2_2, 0.2f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(" ", vector2_2, 0.5f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(LocaleTerms.Loc("Automated screening procedures will divert incoming connections temporarily"), vector2_2, 0.5f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(LocaleTerms.Loc("This window is a final opportunity to regain anonymity."), vector2_2, 0.6f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(LocaleTerms.Loc("As your current IP Address is known, it must be changed") + " -", vector2_2, 0.7f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(LocaleTerms.Loc("This can only be done on your currently active ISP's routing server"), vector2_2, 0.8f, 0.2f, false, 0.2f); Computer computer = Programs.getComputer(this.os, "ispComp"); vector2_2 = this.DrawFlashInString(string.Format(LocaleTerms.Loc("Reverse tracerouting has located this ISP server's IP address as {0}"), computer != null ? (object)computer.ip : (object)"68.144.93.18"), vector2_2, 0.9f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(string.Format(LocaleTerms.Loc("Your local ip : {0} must be tracked here and changed."), (object)this.os.thisComputer.ip), vector2_2, 1f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(" ", vector2_2, 1.1f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(LocaleTerms.Loc("Failure to complete this while active diversion holds will result in complete"), vector2_2, 1.1f, 0.2f, false, 0.2f); vector2_2 = this.DrawFlashInString(LocaleTerms.Loc("and permanent loss of all account data - THIS IS NOT REPEATABLE AND CANNOT BE DELAYED"), vector2_2, 1.2f, 0.2f, false, 0.2f); if (this.warningScreenIsActivating || ((double)this.timeThisState < 1.20000004768372 || !Button.doButton(789798001, 20, (int)((double)vector2_2.Y + 10.0), 400, 40, LocaleTerms.Loc("BEGIN"), new Color?(Color.Black)))) { return; } this.timeThisState = 0.0f; this.state = TraceDangerSequence.TraceDangerState.WarningScreenExiting; this.PreventOSRendering = true; this.onBeatFlashTimer = this.os.timer; this.warningScreenIsActivating = true; this.spinUpSound.Play(1f, 0.0f, 0.0f); this.os.terminal.inputLocked = false; this.os.delayer.Post(ActionDelayer.Wait(0.1), (Action)(() => this.spinUpSound.Play(1f, 0.0f, 0.0f))); this.os.delayer.Post(ActionDelayer.Wait(0.4), (Action)(() => this.spinUpSound.Play(0.4f, 0.0f, 0.0f))); this.os.delayer.Post(ActionDelayer.Wait(0.8), (Action)(() => this.spinUpSound.Play(0.2f, 0.1f, 0.0f))); this.os.delayer.Post(ActionDelayer.Wait(1.3), (Action)(() => this.spinUpSound.Play(0.1f, 0.2f, 0.0f))); this.os.delayer.Post(ActionDelayer.Wait(0.01), (Action)(() => MusicManager.playSongImmediatley("Music/Traced"))); }
public void NewUpdateAlert(OSLoadSaveFileEvent obj) { OS os = obj.OS; double time = 6; Action action = (Action)(() => { os.write("New update of Debug Mod is available"); os.write("You are currently running: " + version + "New version: " + newVersion); }); os.delayer.Post(ActionDelayer.Wait(time), action); obj.IsCancelled = true; }
public override void playerPassedValue(object os) { base.playerPassedValue(os); if (Settings.isAlphaDemoMode) { ComputerLoader.loadMission("Content/Missions/Entropy/EntropyMission3.xml"); } else { ((OS)os).delayer.Post(ActionDelayer.Wait(1.7), () => ComputerLoader.loadMission("Content/Missions/Entropy/ThemeHackTransitionMission.xml")); } }
public void ForceStartBitMissions(object os) { ((OS)os).Flags.AddFlag("bitPathStarted"); ((OS)os).delayer.Post(ActionDelayer.Wait(1.6), (Action)(() => ComputerLoader.loadMission("Content/Missions/BitPath/BitAdv_Intro.xml", false))); Programs.getComputer((OS)os, "mainHubAssets").files.root.searchForFolder("bin").folders.Add(new Folder("Misc") { files = { new FileEntry(PortExploits.crackExeData[9], "Decypher.exe"), new FileEntry(PortExploits.crackExeData[10], "DECHead.exe"), new FileEntry(PortExploits.crackExeData[104], "KBT_PortTest.exe"), new FileEntry("Kellis BioTech medical port cycler - target 104-103.", "kbt_readme.txt") } }); this.SendNotification(os, LocaleTerms.Loc("Agent") + ",\n" + LocaleTerms.Loc("Additional resources have been added to the CSEC members asset pool, for your free use.") + " " + LocaleTerms.Loc("Find them in the misc folder on the asset server.") + "\n\n" + LocaleTerms.Loc("Thankyou") + ",\n -" + this.name, this.name + " " + LocaleTerms.Loc("Admins :: Asset Uploads")); }
private List <DisplayModuleLSHelper.LSItem> BuildDirectoryDrawList(Folder f, int recItteration, int indentOffset, OS os) { List <DisplayModuleLSHelper.LSItem> lsItemList = new List <DisplayModuleLSHelper.LSItem>(); double commandSeperationDelay = 0.019; for (int index1 = 0; index1 < f.folders.Count; ++index1) { int myIndex = index1; DisplayModuleLSHelper.LSItem lsItem = new DisplayModuleLSHelper.LSItem() { DisplayName = "/" + f.folders[index1].name, Clicked = (Action)(() => { int num = 0; for (int index = 0; index < os.navigationPath.Count - recItteration; ++index) { Action action = (Action)(() => os.runCommand("cd ..")); if (num > 0) { os.delayer.Post(ActionDelayer.Wait((double)num * commandSeperationDelay), action); } else { action(); } ++num; } Action action1 = (Action)(() => os.runCommand("cd " + f.folders[myIndex].name)); if (num > 0) { os.delayer.Post(ActionDelayer.Wait((double)num * commandSeperationDelay), action1); } else { action1(); } }), indent = indentOffset }; lsItemList.Add(lsItem); indentOffset += 30; if (os.navigationPath.Count - 1 >= recItteration && os.navigationPath[recItteration] == index1) { lsItemList.AddRange((IEnumerable <DisplayModuleLSHelper.LSItem>) this.BuildDirectoryDrawList(f.folders[index1], recItteration + 1, indentOffset, os)); } indentOffset -= 30; } for (int index1 = 0; index1 < f.files.Count; ++index1) { int myIndex = index1; DisplayModuleLSHelper.LSItem lsItem = new DisplayModuleLSHelper.LSItem() { DisplayName = f.files[index1].name, Clicked = (Action)(() => { int num = 0; for (int index = 0; index < os.navigationPath.Count - recItteration; ++index) { Action action = (Action)(() => os.runCommand("cd ..")); if (num > 0) { os.delayer.Post(ActionDelayer.Wait((double)num * commandSeperationDelay), action); } else { action(); } ++num; } Action action1 = (Action)(() => os.runCommand("cat " + f.files[myIndex].name)); if (num > 0) { os.delayer.Post(ActionDelayer.Wait((double)num * commandSeperationDelay), action1); } else { action1(); } }), indent = indentOffset }; lsItemList.Add(lsItem); } if (f.folders.Count == 0 && f.files.Count == 0) { DisplayModuleLSHelper.LSItem lsItem = new DisplayModuleLSHelper.LSItem() { IsEmtyDisplay = true, indent = indentOffset }; lsItemList.Add(lsItem); } return(lsItemList); }
public void Update(float dt) { this.flashInTimeLeft = Math.Max(0.0f, this.flashInTimeLeft - dt); this.timeElapsed += dt; if (!this.IsMonitoringDLCEndingCases) { return; } if (this.CrashingAircraft != null) { if (this.CrashingAircraft.IsInCriticalFirmwareFailure) { this.TargetHasStartedCrashing = true; this.IsInPostSaveState = false; double totalSeconds = MediaPlayer.PlayPosition.TotalSeconds; double num1 = 1.0 / (131.0 / 60.0); double num2 = num1 * 4.0; double num3 = num1 * 2.0; double num4 = totalSeconds < 58.0 ? 999.0 : (totalSeconds < 117.0 ? num2 : num3); if ((totalSeconds + num1 / 2.0) % num4 < num1 / 4.0) { this.os.warningFlash(); } } else if (this.TargetHasStartedCrashing) { if (!this.os.Flags.HasFlag("DLC_PlaneResult")) { RunnableConditionalActions.LoadIntoOS("DLC/ActionScripts/FinaleSaveActions.xml", (object)this.os); this.os.Flags.AddFlag("DLC_PlaneSaveResponseTriggered"); this.os.Flags.AddFlag("DLC_PlaneResult"); } if (!this.CrashingAircraft.IsInCriticalDescent() && !MediaPlayer.IsRepeating) { MusicManager.FADE_TIME = 6f; MusicManager.transitionToSong("DLC/Music/RemiDrone"); MediaPlayer.IsRepeating = true; this.os.delayer.Post(ActionDelayer.Wait(2.0), (Action)(() => this.AircraftSaveSound.Play())); this.IsInPostSaveState = true; } } } else if (this.TargetHasStartedCrashing) { if (this.SecondaryAircraft == null || this.SecondaryAircraft.IsInCriticalFirmwareFailure) { if (!this.os.Flags.HasFlag("DLC_PlaneResult")) { RunnableConditionalActions.LoadIntoOS("DLC/ActionScripts/FinaleDoubleCrashActions.xml", (object)this.os); this.os.Flags.AddFlag("DLC_DoubleCrashResponseTriggered"); this.os.Flags.AddFlag("DLC_PlaneResult"); } } else if (!this.os.Flags.HasFlag("DLC_PlaneResult")) { RunnableConditionalActions.LoadIntoOS("DLC/ActionScripts/FinaleCrashActions.xml", (object)this.os); this.os.Flags.AddFlag("DLC_PlaneCrashedResponseTriggered"); this.os.Flags.AddFlag("DLC_PlaneResult"); } if (MusicManager.currentSongName != "DLC\\Music\\CrashTrack") { MusicManager.playSongImmediatley("DLC\\Music\\CrashTrack"); MediaPlayer.IsRepeating = false; } } if (!MediaPlayer.IsRepeating && MediaPlayer.State != MediaState.Playing && !this.IsInPostSaveState) { MusicManager.FADE_TIME = 6f; MissionFunctions.runCommand(7, "changeSongDLC"); MediaPlayer.IsRepeating = true; } }
private List <LSItem> BuildDirectoryDrawList(Folder f, int recItteration, int indentOffset, OS os) { var list = new List <LSItem>(); var commandSeperationDelay = 0.019; for (var index1 = 0; index1 < f.folders.Count; ++index1) { var myIndex = index1; var lsItem = new LSItem { DisplayName = "/" + f.folders[index1].name, Clicked = () => { var num = 0; for (var index = 0; index < os.navigationPath.Count - recItteration; ++index) { Action action = () => os.runCommand("cd .."); if (num > 0) { os.delayer.Post(ActionDelayer.Wait(num * commandSeperationDelay), action); } else { action(); } ++num; } Action action1 = () => os.runCommand("cd " + f.folders[myIndex].name); if (num > 0) { os.delayer.Post(ActionDelayer.Wait(num * commandSeperationDelay), action1); } else { action1(); } }, indent = indentOffset }; list.Add(lsItem); indentOffset += 30; if (os.navigationPath.Count - 1 >= recItteration && os.navigationPath[recItteration] == index1) { list.AddRange(BuildDirectoryDrawList(f.folders[index1], recItteration + 1, indentOffset, os)); } indentOffset -= 30; } for (var index1 = 0; index1 < f.files.Count; ++index1) { var myIndex = index1; var lsItem = new LSItem { DisplayName = f.files[index1].name, Clicked = () => { var num = 0; for (var index = 0; index < os.navigationPath.Count - recItteration; ++index) { Action action = () => os.runCommand("cd .."); if (num > 0) { os.delayer.Post(ActionDelayer.Wait(num * commandSeperationDelay), action); } else { action(); } ++num; } Action action1 = () => os.runCommand("cat " + f.files[myIndex].name); if (num > 0) { os.delayer.Post(ActionDelayer.Wait(num * commandSeperationDelay), action1); } else { action1(); } }, indent = indentOffset }; list.Add(lsItem); } if (f.folders.Count == 0 && f.files.Count == 0) { var lsItem = new LSItem { IsEmtyDisplay = true, indent = indentOffset }; list.Add(lsItem); } return(list); }
private void DrawWarningScreen() { if (warningScreenIsActivating) { spriteBatch.Draw(Utils.white, fullscreen, Color.White); } else { DrawFlashingRedBackground(); } var text = "WARNING"; var vector2_1 = titleFont.MeasureString(text); var widthTo = fullscreen.Width * 0.65f; var scale = widthTo / vector2_1.X; var vector2_2 = new Vector2(20f, -10f); spriteBatch.DrawString(titleFont, text, vector2_2, Color.Black, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 0.5f); vector2_2.Y += (float)(vector2_1.Y * (double)scale - 55.0); TextItem.doFontLabel(vector2_2, "COMPLETED TRACE DETECTED : EMERGENCY RECOVERY MODE ACTIVE", titleFont, Color.Black, widthTo, float.MaxValue); vector2_2.Y += 40f; vector2_2 = DrawFlashInString("Unsyndicated foreign connection detected during active trace", vector2_2, 0.0f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString(" :: Emergency recovery mode activated", vector2_2, 0.1f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString("-----------------------------------------------------------------------", vector2_2, 0.2f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString(" ", vector2_2, 0.5f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString( "Automated screening procedures will divert incoming connections temporarily", vector2_2, 0.5f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString("This window is a final oppourtunity to regain anonymity.", vector2_2, 0.6f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString("As your current IP Address is known, it must be changed -", vector2_2, 0.7f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString("This can ony be done on your currently active ISP's routing server", vector2_2, 0.8f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString("Reverse tracerouting has located this ISP server's ip address as 68.144.93.18", vector2_2, 0.9f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString( "Your local ip : " + os.thisComputer.ip + " must be tracked here and changed.", vector2_2, 1f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString(" ", vector2_2, 1.1f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString("Failure to complete this while active diversion holds will result in complete", vector2_2, 1.1f, 0.2f, false, 0.2f); vector2_2 = DrawFlashInString( "and permenant loss of all account data - THIS IS NOT REPEATABLE AND CANNOT BE DELAYED", vector2_2, 1.2f, 0.2f, false, 0.2f); if (warningScreenIsActivating || timeThisState < 1.20000004768372 || !Button.doButton(789798001, 20, (int)(vector2_2.Y + 10.0), 400, 40, "BEGIN", Color.Black)) { return; } timeThisState = 0.0f; state = TraceDangerState.WarningScreenExiting; PreventOSRendering = true; onBeatFlashTimer = os.timer; warningScreenIsActivating = true; spinUpSound.Play(1f, 0.0f, 0.0f); os.terminal.inputLocked = false; os.delayer.Post(ActionDelayer.Wait(0.1), () => spinUpSound.Play(1f, 0.0f, 0.0f)); os.delayer.Post(ActionDelayer.Wait(0.4), () => spinUpSound.Play(0.4f, 0.0f, 0.0f)); os.delayer.Post(ActionDelayer.Wait(0.8), () => spinUpSound.Play(0.2f, 0.1f, 0.0f)); os.delayer.Post(ActionDelayer.Wait(1.3), () => spinUpSound.Play(0.1f, 0.2f, 0.0f)); os.delayer.Post(ActionDelayer.Wait(0.01), () => MusicManager.playSongImmediatley("Music/Traced")); }
public override void addValue(int value, object os) { var oldValue = playerValue; base.addValue(value, os); if (valuePassedPoint(oldValue, 1) && !((OS)os).Flags.HasFlag("themeChangerAdded")) { var folder1 = Programs.getComputer((OS)os, "mainHubAssets").files.root.searchForFolder("bin"); var folder2 = new Folder("ThemeChanger"); folder2.files.Add(new FileEntry(PortExploits.crackExeData[14], "ThemeChanger.exe")); var dataEntry = "\n-- Theme Changer Readme --\n\nThis program allows for fast hot-swapping of x-server theme files from local and remote conneced sources.\nFiles in the \"Remote\" row are remotely hosted valid theme files in the currently nagivated folder on a connected machine.\nFiles in the \"Local\" row are locally hosted theme files in the home or sys folder.\nThemeChanger allows a user to select any of these, and will automatically download it's contents into x-server.sys\nin the system folder, and activate the system theme without the need for a reboot.\nThe program will also automatically back up existing themes so that all known styles are preserved for future use."; folder2.files.Add(new FileEntry(dataEntry, "info.txt")); folder1.folders.Add(folder2); ((OS)os).delayer.Post(ActionDelayer.Wait(1.0), () => { SendAssetAddedNotification(os); ((OS)os).Flags.AddFlag("themeChangerAdded"); ((OS)os).saveGame(); }); } if (valuePassedPoint(oldValue, 4)) { ((OS)os).delayer.Post(ActionDelayer.Wait(2.0), () => { ((MissionHubServer)Programs.getComputer((OS)os, "mainHub").getDaemon(typeof(MissionHubServer))) .AddMissionToListings("Content/Missions/MainHub/BitSet/Missions/BitHubSet01.xml"); ((OS)os).saveGame(); }); } else if (playerValue >= 7 && ((OS)os).Flags.HasFlag("decypher") && (((OS)os).Flags.HasFlag("dechead") && !((OS)os).Flags.HasFlag("csecRankingS2Pass"))) { SendNotification(os, "Project Junebug"); ((OS)os).Flags.AddFlag("csecRankingS2Pass"); ((OS)os).saveGame(); } else { if (playerValue < 10 || ((OS)os).Flags.HasFlag("bitPathStarted")) { return; } ((OS)os).Flags.AddFlag("bitPathStarted"); ((OS)os).delayer.Post(ActionDelayer.Wait(1.6), () => ComputerLoader.loadMission("Content/Missions/BitPath/BitAdv_Intro.xml")); Programs.getComputer((OS)os, "mainHubAssets") .files.root.searchForFolder("bin") .folders.Add(new Folder("Misc") { files = { new FileEntry(PortExploits.crackExeData[9], "Decypher.exe"), new FileEntry(PortExploits.crackExeData[10], "DECHead.exe"), new FileEntry(PortExploits.crackExeData[104], "KBT_PortTest.exe"), new FileEntry("Kellis BioTech medical port cycler - target 104-103.", "kbt_readme.txt") } }); SendNotification(os, "Agent,\nAdditional resources have been added to the CSEC members asset pool, for your free use. Find them in the misc folder on the asset server.\n\nThankyou,\n -" + name, name + " Admins :: Asset Uploads"); } }
public override void addValue(int value, object os) { int playerValue = this.playerValue; base.addValue(value, os); if (this.valuePassedPoint(playerValue, 1) && !((OS)os).Flags.HasFlag("themeChangerAdded")) { Folder folder1 = Programs.getComputer((OS)os, "mainHubAssets").files.root.searchForFolder("bin"); Folder folder2 = new Folder("ThemeChanger"); folder2.files.Add(new FileEntry(PortExploits.crackExeData[14], "ThemeChanger.exe")); string dataEntry = Utils.readEntireFile("Content/LocPost/ThemeChangerReadme.txt"); folder2.files.Add(new FileEntry(dataEntry, "info.txt")); folder1.folders.Add(folder2); ((OS)os).delayer.Post(ActionDelayer.Wait(1.0), (Action)(() => { this.SendAssetAddedNotification(os); ((OS)os).Flags.AddFlag("themeChangerAdded"); ((OS)os).saveGame(); })); } if (this.valuePassedPoint(playerValue, 4)) { ((OS)os).delayer.Post(ActionDelayer.Wait(2.0), (Action)(() => { ((MissionHubServer)Programs.getComputer((OS)os, "mainHub").getDaemon(typeof(MissionHubServer))).AddMissionToListings("Content/Missions/MainHub/BitSet/Missions/BitHubSet01.xml", -1); ((OS)os).saveGame(); })); } else if (this.playerValue >= 7 && ((OS)os).Flags.HasFlag("decypher") && ((OS)os).Flags.HasFlag("dechead") && !((OS)os).Flags.HasFlag("csecRankingS2Pass")) { this.SendNotification(os, "Project Junebug"); ((OS)os).Flags.AddFlag("csecRankingS2Pass"); ((OS)os).saveGame(); } else if (this.playerValue >= 10 && !((OS)os).Flags.HasFlag("bitPathStarted")) { MissionHubServer daemon = (MissionHubServer)Programs.getComputer((OS)os, "mainHub").getDaemon(typeof(MissionHubServer)); if (daemon != null && daemon.GetNumberOfAvaliableMissions() > 0) { return; } this.ForceStartBitMissions(os); } if (this.playerValue >= 2 && ((OS)os).Flags.HasFlag("dlc_complete") && DLC1SessionUpgrader.HasDLC1Installed && !((OS)os).Flags.HasFlag("dlc_post_missionadded")) { bool flag = false; string flagStartingWith = ((OS)os).Flags.GetFlagStartingWith("dlc_csec_end_facval"); if (flagStartingWith != null) { try { if (this.playerValue - Convert.ToInt32(flagStartingWith.Substring(flagStartingWith.IndexOf(":") + 1)) > 1) { flag = true; } } catch (Exception ex) { Utils.AppendToErrorFile(Utils.GenerateReportFromException(ex)); } } else { flag = true; } if (flag && ((OS)os).Flags.HasFlag("DLC_PlaneSaveResponseTriggered")) { ((OS)os).Flags.AddFlag("dlc_post_missionadded"); MissionHubServer daemon1 = (MissionHubServer)Programs.getComputer((OS)os, "mainHub").getDaemon(typeof(MissionHubServer)); FileEntry fileEntry = Programs.getComputer((OS)os, "dHidden").files.root.searchForFolder("home").searchForFile("PA_0022_Incident.dec"); Programs.getComputer((OS)os, "mainHubAssets").files.root.searchForFolder("home").files.Add(fileEntry); daemon1.AddMissionToListings("Content/DLC/Missions/Injections/Missions/CSEC_Injection_Mission.xml", -1); if (Programs.getComputer((OS)os, "dAttackHome").files.root.searchForFolder("home").searchForFolder("uni").files.Count == 0) { MailServer daemon2 = ((OS)os).netMap.mailServer.getDaemon(typeof(MailServer)) as MailServer; string str = Utils.readEntireFile("Content/DLC/Docs/StrikerLateEmail.txt"); int num = str.IndexOf("\n"); string subject = str.Substring(0, num).Trim(); string body = str.Substring(num, str.Length - num).Trim(); List <string> attachments = new List <string>(); if (Settings.ActiveLocale == "en-us") { attachments.Add("note#%#Important Extra Information#%#F**k you"); } daemon2.addMail(MailServer.generateEmail(subject, body, "StrikeR", attachments), ((OS)os).defaultUser.name); } ((OS)os).saveGame(); } } }