Example #1
0
        public override void Trigger(object os_obj)
        {
            Computer computer = Programs.getComputer((OS)os_obj, this.TargetComp);

            if (computer == null)
            {
                throw new NullReferenceException("Computer " + this.TargetComp + " could not be found for SARemoveMissionFromHubServer Function, removing mission: " + this.MissionFilepath);
            }
            MissionHubServer daemon1 = computer.getDaemon(typeof(MissionHubServer)) as MissionHubServer;

            if (daemon1 != null)
            {
                daemon1.RemoveMissionFromListings(this.MissionFilepath);
            }
            else
            {
                DLCHubServer daemon2 = computer.getDaemon(typeof(DLCHubServer)) as DLCHubServer;
                if (daemon2 != null)
                {
                    daemon2.RemoveMission(this.MissionFilepath);
                }
                else
                {
                    MissionListingServer daemon3 = computer.getDaemon(typeof(MissionListingServer)) as MissionListingServer;
                    if (daemon3 == null)
                    {
                        throw new NullReferenceException("Computer " + this.TargetComp + " does not contain a MissionHubServer, MissionListingServer or DLCHubServer daemon for remove mission function adding mission: " + this.MissionFilepath);
                    }
                    daemon3.removeMission(this.MissionFilepath);
                }
            }
        }
Example #2
0
        public static void UpdateAlertIcon(object osobj)
        {
            OS     os = (OS)osobj;
            string flagStartingWith1 = os.Flags.GetFlagStartingWith("_changeAlertIconType:");
            string flagStartingWith2 = os.Flags.GetFlagStartingWith("_changeAlertIconTarget:");

            if (flagStartingWith1 == null || flagStartingWith2 == null)
            {
                return;
            }
            string   str = flagStartingWith1.Substring("_changeAlertIconType:".Length);
            string   ip_Or_ID_or_Name = flagStartingWith2.Substring("_changeAlertIconTarget:".Length);
            Computer computer         = Programs.getComputer(os, ip_Or_ID_or_Name);

            switch (str.ToLower())
            {
            case "mail":
                MailServer daemon1 = (MailServer)computer.getDaemon(typeof(MailServer));
                bool       flag    = false;
                for (int index = 0; index < daemon1.comp.users.Count; ++index)
                {
                    if (daemon1.comp.users[index].name == os.defaultUser.name)
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    throw new FormatException("Mail server " + ip_Or_ID_or_Name + " does not have a user account for the player!\nA mail server must have a player account to be used as the alert icon");
                }
                os.mailicon.UpdateTargetServer(daemon1);
                os.ShowDLCAlertsIcon = false;
                break;

            case "irc":
                IRCDaemon daemon2 = (IRCDaemon)computer.getDaemon(typeof(IRCDaemon));
                os.ShowDLCAlertsIcon = true;
                os.hubServerAlertsIcon.UpdateTarget((object)daemon2, (object)daemon2.comp);
                break;

            case "irchub":
                DLCHubServer daemon3 = (DLCHubServer)computer.getDaemon(typeof(DLCHubServer));
                os.ShowDLCAlertsIcon = true;
                os.hubServerAlertsIcon.UpdateTarget((object)daemon3, (object)daemon3.comp);
                break;

            case "board":
                MessageBoardDaemon daemon4 = (MessageBoardDaemon)computer.getDaemon(typeof(MessageBoardDaemon));
                os.ShowDLCAlertsIcon = true;
                os.hubServerAlertsIcon.UpdateTarget((object)daemon4, (object)daemon4.comp);
                break;
            }
        }
Example #3
0
 private void CompleteExecution()
 {
     this.PhaseTitle    = LocaleTerms.Loc("COMPLETE");
     this.PhaseSubtitle = "---";
     this.State         = DLCIntroExe.IntroState.Exiting;
     this.isExiting     = true;
     this.os.traceCompleteOverrideAction = (Action)null;
     if (!this.os.Flags.HasFlag("KaguyaTrialComplete"))
     {
         this.os.Flags.AddFlag("KaguyaTrialComplete");
         this.os.allFactions.setCurrentFaction("Bibliotheque", this.os);
         this.os.homeNodeID        = "dhs";
         this.os.homeAssetServerID = "dhsDrop";
         MissionFunctions.runCommand(1, "addRankSilent");
         this.os.currentMission = (ActiveMission)null;
         Computer computer = Programs.getComputer(this.os, "dhs");
         (computer.getDaemon(typeof(DLCHubServer)) as DLCHubServer).AddAgent(this.os.defaultUser.name, "dnkA19ds", new Color(222, 153, 24));
         for (int index = 0; index < computer.users.Count; ++index)
         {
             UserDetail user = computer.users[index];
             if (user.name == this.os.defaultUser.name)
             {
                 user.known            = true;
                 computer.users[index] = user;
             }
         }
     }
     this.os.runCommand("connect 69.58.186.114");
     this.os.IsInDLCMode      = true;
     this.os.DisableEmailIcon = false;
     this.isExiting           = true;
 }
Example #4
0
        public override void Trigger(object os_obj)
        {
            Computer computer = Programs.getComputer((OS)os_obj, this.TargetComp);

            if (computer == null)
            {
                throw new NullReferenceException("Computer " + this.TargetComp + " could not be found for SAAddIRCMessage Function, adding message: " + this.Message);
            }
            IRCDaemon daemon1 = computer.getDaemon(typeof(IRCDaemon)) as IRCDaemon;
            IRCSystem ircSystem;

            if (daemon1 != null)
            {
                ircSystem = daemon1.System;
            }
            else
            {
                DLCHubServer daemon2 = computer.getDaemon(typeof(DLCHubServer)) as DLCHubServer;
                if (daemon2 == null)
                {
                    throw new NullReferenceException("Computer " + this.TargetComp + " does not contain an IRC server daemon for SAAddIRCMessage function adding message: " + this.Message);
                }
                ircSystem = daemon2.IRCSystem;
            }
            if ((double)this.Delay <= 0.0)
            {
                if ((double)Math.Abs(this.Delay) < 1.0 / 1000.0)
                {
                    ircSystem.AddLog(this.Author, this.Message, (string)null);
                }
                else
                {
                    DateTime dateTime  = DateTime.Now - TimeSpan.FromSeconds((double)this.Delay);
                    string   timestamp = dateTime.Hour.ToString("00") + ":" + dateTime.Minute.ToString("00");
                    ircSystem.AddLog(this.Author, this.Message, timestamp);
                }
            }
            else
            {
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
Example #5
0
        public override void Update(float t)
        {
            base.Update(t);
            if (IsTargetingPorthackHeart)
            {
                progress = Utils.rand(0.98f);
            }
            else
            {
                progress += t / CRACK_TIME;
            }
            if (progress >= 1.0)
            {
                progress = 1f;
                if (!hasCompleted)
                {
                    Completed();
                    hasCompleted = true;
                }
                sucsessTimer -= t;
                if (sucsessTimer <= 0.0)
                {
                    isExiting = true;
                }
            }
            else
            {
                target.hostileActionTaken();
            }
            if (progress < 1.0)
            {
                textSwitchTimer -= t;
                if (textSwitchTimer <= 0.0)
                {
                    textSwitchTimer = TIME_BETWEEN_TEXT_SWITCH;
                    ++textOffsetIndex;
                }
            }
            if (hasCheckedForheart || progress <= 0.5)
            {
                return;
            }
            hasCheckedForheart = true;
            var porthackHeartDaemon = target.getDaemon(typeof(PorthackHeartDaemon)) as PorthackHeartDaemon;

            if (porthackHeartDaemon == null)
            {
                return;
            }
            IsTargetingPorthackHeart = true;
            porthackHeartDaemon.BreakHeart();
            cubeSeq.ShouldCentralSpinInfinitley = true;
        }
        internal static DelayableActionSystem FindDelayableActionSystemOnComputer(Computer c)
        {
            IRCDaemon daemon1 = c.getDaemon(typeof(IRCDaemon)) as IRCDaemon;

            if (daemon1 != null)
            {
                return(daemon1.DelayedActions);
            }
            DLCHubServer daemon2 = c.getDaemon(typeof(DLCHubServer)) as DLCHubServer;

            if (daemon2 != null)
            {
                return(daemon2.DelayedActions);
            }
            FastActionHost daemon3 = c.getDaemon(typeof(FastActionHost)) as FastActionHost;

            if (daemon3 != null)
            {
                return((DelayableActionSystem)daemon3.DelayedActions);
            }
            throw new InvalidOperationException("Target computer " + c.name + " does not contain a Daemon that supports delayable actions");
        }
        public override void Trigger(object os_obj)
        {
            OS       os       = (OS)os_obj;
            Computer computer = Programs.getComputer(os, this.TargetComp);

            if (computer == null)
            {
                throw new NullReferenceException("Computer " + this.TargetComp + " could not be found for SAAddMissionToHubServer Function, adding mission: " + this.MissionFilepath);
            }
            MissionHubServer daemon1 = computer.getDaemon(typeof(MissionHubServer)) as MissionHubServer;

            if (daemon1 != null)
            {
                daemon1.AddMissionToListings(Utils.GetFileLoadPrefix() + this.MissionFilepath, -1);
            }
            else
            {
                DLCHubServer daemon2 = computer.getDaemon(typeof(DLCHubServer)) as DLCHubServer;
                if (daemon2 != null)
                {
                    daemon2.AddMission(Utils.GetFileLoadPrefix() + this.MissionFilepath, this.AssignmentTag, this.StartsComplete);
                }
                else
                {
                    MissionListingServer daemon3 = computer.getDaemon(typeof(MissionListingServer)) as MissionListingServer;
                    if (daemon3 == null)
                    {
                        throw new NullReferenceException("Computer " + this.TargetComp + " does not contain a MissionHubServer, MissionListingServer or DLCHubServer daemon for addMission function adding mission: " + this.MissionFilepath);
                    }
                    List <ActiveMission> branchMissions = os.branchMissions;
                    ActiveMission        m = (ActiveMission)ComputerLoader.readMission(Utils.GetFileLoadPrefix() + this.MissionFilepath);
                    os.branchMissions = branchMissions;
                    daemon3.addMisison(m, this.AssignmentTag.ToLower() == "top");
                }
            }
        }
        private bool RemoteCompCanBeAccessed()
        {
            if (this.RemoteSourceIP == null)
            {
                return(false);
            }
            Computer computer = Programs.getComputer(this.os, this.RemoteSourceIP);

            if (computer == null || (double)computer.bootTimer > 0.0)
            {
                return(false);
            }
            WhitelistConnectionDaemon daemon = (WhitelistConnectionDaemon)computer.getDaemon(typeof(WhitelistConnectionDaemon));

            return(daemon == null || daemon.comp.files.root.searchForFolder("Whitelist").searchForFile("authenticator.dll") != null);
        }
        public override void Trigger(object os_obj)
        {
            Computer computer = Programs.getComputer((OS)os_obj, this.TargetComp);

            if (computer == null)
            {
                throw new NullReferenceException("Computer " + this.TargetComp + " could not be found for SAAddThreadToMissionBoard Function, adding thread: " + this.ThreadFilepath);
            }
            MessageBoardDaemon daemon = computer.getDaemon(typeof(MessageBoardDaemon)) as MessageBoardDaemon;

            if (daemon == null)
            {
                throw new NullReferenceException("Computer " + this.TargetComp + " does not contain a MessageBoard daemon for SAAddThreadToMissionBoard function adding thread: " + this.ThreadFilepath);
            }
            string threadData = Utils.readEntireFile(Utils.GetFileLoadPrefix() + this.ThreadFilepath);

            daemon.AddThread(threadData);
        }
        public bool IPCanPassWhitelist(string ip, bool isFromRemote)
        {
            if (!this.AuthenticatesItself && !isFromRemote)
            {
                return(true);
            }
            if (this.RemoteSourceIP != null)
            {
                Computer computer = Programs.getComputer(this.os, this.RemoteSourceIP);
                if (!this.RemoteCompCanBeAccessed() || this.folder.searchForFile("authenticator.dll") == null)
                {
                    return(true);
                }
                WhitelistConnectionDaemon daemon = (WhitelistConnectionDaemon)computer.getDaemon(typeof(WhitelistConnectionDaemon));
                if (daemon == null)
                {
                    return(true);
                }
                return(daemon.IPCanPassWhitelist(ip, true));
            }
            if (this.folder.searchForFile("authenticator.dll") == null)
            {
                return(true);
            }
            FileEntry fileEntry = this.folder.searchForFile("list.txt");

            if (fileEntry == null)
            {
                return(true);
            }
            foreach (string str in fileEntry.data.Split(Utils.robustNewlineDelim, StringSplitOptions.RemoveEmptyEntries))
            {
                if (this.os.thisComputer.ip == str.Trim())
                {
                    return(true);
                }
            }
            return(false);
        }
Example #11
0
 public override void Draw(float t)
 {
     base.Draw(t);
     drawOutline();
     drawTarget("app:");
     var rectangle = Utils.InsetRectangle(GetContentAreaDest(), 1);
     var amount = os.warningFlashTimer/OS.WARNING_FLASH_TIME;
     var minHeight = 2f;
     if (amount > 0.0)
         minHeight += amount*(rectangle.Height - minHeight);
     var drawColor = Color.Lerp(Utils.AddativeWhite*0.5f, Utils.AddativeRed, amount);
     bars.Draw(spriteBatch, GetContentAreaDest(), minHeight, 4f, 1f, drawColor);
     switch (state)
     {
         case SequencerExeState.Unavaliable:
             spriteBatch.Draw(Utils.white, rectangle, Color.Black*0.5f);
             var dest = Utils.InsetRectangle(rectangle, 6);
             if (!isExiting)
                 TextItem.doFontLabelToSize(dest, "LINK UNAVAILABLE", GuiData.titlefont, Utils.AddativeWhite);
             var destinationRectangle1 = dest;
             destinationRectangle1.Y += destinationRectangle1.Height - 20;
             destinationRectangle1.Height = 20;
             if (isExiting)
                 break;
             GuiData.spriteBatch.Draw(Utils.white, destinationRectangle1, Color.Black*0.5f);
             if (
                 !Button.doButton(32711803, destinationRectangle1.X, destinationRectangle1.Y,
                     destinationRectangle1.Width, destinationRectangle1.Height, "Exit", os.lockedColor))
                 break;
             isExiting = true;
             break;
         case SequencerExeState.AwaitingActivation:
             var height = 30;
             var destinationRectangle2 = new Rectangle(this.bounds.X + 1,
                 this.bounds.Y + this.bounds.Height/2 - height, this.bounds.Width - 2, height*2);
             spriteBatch.Draw(Utils.white, destinationRectangle2, Color.Black*0.92f);
             if (
                 !Button.doButton(8310101, this.bounds.X + 10, this.bounds.Y + this.bounds.Height/2 - height/2,
                     this.bounds.Width - 20, height, "ACTIVATE", os.highlightColor))
                 break;
             stateTimer = 0.0f;
             state = SequencerExeState.SpinningUp;
             bars.MinLineChangeTime = 0.1f;
             bars.MaxLineChangeTime = 1f;
             originalTheme = ThemeManager.currentTheme;
             MusicManager.FADE_TIME = 0.6f;
             oldSongName = MusicManager.currentSongName;
             MusicManager.transitionToSong("Music\\Roller_Mobster_Clipped");
             MediaPlayer.IsRepeating = false;
             targetComp = Programs.getComputer(os, targetID);
             var webServerDaemon = (WebServerDaemon) targetComp.getDaemon(typeof (WebServerDaemon));
             if (webServerDaemon == null)
                 break;
             webServerDaemon.LoadWebPage("index.html");
             break;
         case SequencerExeState.SpinningUp:
             var bounds = rectangle;
             bounds.Height = (int) (bounds.Height*(stateTimer/(double) SPIN_UP_TIME));
             bounds.Y = rectangle.Y + rectangle.Height - bounds.Height + 1;
             bounds.Width += 4;
             bars.Draw(spriteBatch, bounds, minHeight, 4f, 1f, os.brightLockedColor);
             break;
         case SequencerExeState.Active:
             spriteBatch.Draw(Utils.white, GetContentAreaDest(), Color.Black*0.5f);
             TextItem.doFontLabelToSize(GetContentAreaDest(), " G O   G O   G O ", GuiData.titlefont,
                 Color.Lerp(Utils.AddativeRed, os.brightLockedColor, Math.Min(1f, stateTimer/2f)));
             DrawActiveState();
             break;
     }
 }
Example #12
0
        public static void runCommand(int value, string name)
        {
            MissionFunctions.assertOS();
            if (name.ToLower().Trim() == "none")
            {
                return;
            }
            if (name.Equals("addRank"))
            {
                if (!OS.TestingPassOnly || MissionFunctions.os.currentFaction != null)
                {
                    MissionFunctions.os.currentFaction.addValue(value, (object)MissionFunctions.os);
                    string email = MailServer.generateEmail(LocaleTerms.Loc("Contract Successful"), string.Format(Utils.readEntireFile("Content/LocPost/MissionCompleteEmail.txt"), (object)MissionFunctions.os.currentFaction.getRank(), (object)MissionFunctions.os.currentFaction.getMaxRank(), (object)MissionFunctions.os.currentFaction.name), MissionFunctions.os.currentFaction.name + " ReplyBot");
                    ((MailServer)MissionFunctions.os.netMap.mailServer.getDaemon(typeof(MailServer))).addMail(email, MissionFunctions.os.defaultUser.name);
                }
                else if (OS.DEBUG_COMMANDS && MissionFunctions.os.currentFaction == null)
                {
                    MissionFunctions.os.write("----------");
                    MissionFunctions.os.write("----------");
                    MissionFunctions.os.write("ERROR IN FUNCTION 'addRank'");
                    MissionFunctions.os.write("Player is not assigned to a faction, so rank cannot be added!");
                    MissionFunctions.os.write("Make sure you have assigned a player a faction with the 'SetFaction' function before using this!");
                    MissionFunctions.os.write("----------");
                    MissionFunctions.os.write("----------");
                }
            }
            else if (name.Equals("addRankSilent"))
            {
                if (OS.TestingPassOnly && MissionFunctions.os.currentFaction == null)
                {
                    return;
                }
                MissionFunctions.os.currentFaction.addValue(value, (object)MissionFunctions.os);
            }
            else if (name.StartsWith("addFlags:"))
            {
                foreach (string flag in name.Substring("addFlags:".Length).Split(Utils.commaDelim, StringSplitOptions.RemoveEmptyEntries))
                {
                    MissionFunctions.os.Flags.AddFlag(flag);
                }
                CustomFaction currentFaction = MissionFunctions.os.currentFaction as CustomFaction;
                if (currentFaction == null)
                {
                    return;
                }
                currentFaction.CheckForAllCustomActionsToRun((object)MissionFunctions.os);
            }
            else if (name.StartsWith("removeFlags:"))
            {
                string[] strArray = name.Substring("removeFlags:".Length).Split(Utils.commaDelim, StringSplitOptions.RemoveEmptyEntries);
                for (int index = 0; index < strArray.Length; ++index)
                {
                    if (MissionFunctions.os.Flags.HasFlag(strArray[index]))
                    {
                        MissionFunctions.os.Flags.RemoveFlag(strArray[index]);
                    }
                }
                CustomFaction currentFaction = MissionFunctions.os.currentFaction as CustomFaction;
                if (currentFaction == null)
                {
                    return;
                }
                currentFaction.CheckForAllCustomActionsToRun((object)MissionFunctions.os);
            }
            else if (name.StartsWith("setFaction:"))
            {
                string newFaction = name.Substring("setFaction:".Length);
                bool   flag       = false;
                foreach (KeyValuePair <string, Faction> faction in MissionFunctions.os.allFactions.factions)
                {
                    if (faction.Value.idName.ToLower() == newFaction.ToLower())
                    {
                        MissionFunctions.os.allFactions.setCurrentFaction(newFaction, MissionFunctions.os);
                        flag = true;
                        break;
                    }
                }
                if (!flag && OS.TestingPassOnly)
                {
                    throw new NullReferenceException("Faction " + newFaction + "not found for setFaction action!");
                }
            }
            else if (name.StartsWith("loadConditionalActions:"))
            {
                RunnableConditionalActions.LoadIntoOS(name.Substring("loadConditionalActions:".Length), (object)MissionFunctions.os);
            }
            else if (name.Equals("triggerThemeHackRevenge"))
            {
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(5.0), (Action)(() =>
                {
                    string email = MailServer.generateEmail(LocaleTerms.Loc("Are you Kidding me?"), Utils.readEntireFile("Content/LocPost/NaixEmail.txt"), "*****@*****.**");
                    ((MailServer)MissionFunctions.os.netMap.mailServer.getDaemon(typeof(MailServer))).addMail(email, MissionFunctions.os.defaultUser.name);
                    MissionFunctions.os.delayer.Post(ActionDelayer.Wait(24.0), (Action)(() =>
                    {
                        try
                        {
                            HackerScriptExecuter.runScript("HackerScripts/ThemeHack.txt", (object)MissionFunctions.os, (string)null, (string)null);
                        }
                        catch (Exception ex)
                        {
                            if (!Settings.recoverFromErrorsSilently)
                            {
                                throw ex;
                            }
                            MissionFunctions.os.write("CAUTION: UNSYNDICATED OUTSIDE CONNECTION ATTEMPT");
                            MissionFunctions.os.write("RECOVERED FROM CONNECTION SUBTERFUGE SUCCESSFULLY");
                            Console.WriteLine("Critical error loading hacker script - aborting");
                        }
                    }));
                }));
            }
            else if (name.Equals("changeSong"))
            {
                switch (value)
                {
                case 2:
                    MusicManager.transitionToSong("Music\\The_Quickening");
                    break;

                case 3:
                    MusicManager.transitionToSong("Music\\TheAlgorithm");
                    break;

                case 4:
                    MusicManager.transitionToSong("Music\\Ryan3");
                    break;

                case 5:
                    MusicManager.transitionToSong("Music\\Bit(Ending)");
                    break;

                case 6:
                    MusicManager.transitionToSong("Music\\Rico_Puestel-Roja_Drifts_By");
                    break;

                case 7:
                    MusicManager.transitionToSong("Music\\out_run_the_wolves");
                    break;

                case 8:
                    MusicManager.transitionToSong("Music\\Irritations");
                    break;

                case 9:
                    MusicManager.transitionToSong("Music\\Broken_Boy");
                    break;

                case 10:
                    MusicManager.transitionToSong("Music\\Ryan10");
                    break;

                case 11:
                    MusicManager.transitionToSong("Music\\tetrameth");
                    break;

                default:
                    MusicManager.transitionToSong("Music\\Revolve");
                    break;
                }
            }
            else if (name.Equals("entropyEndMissionSetup"))
            {
                MissionFunctions.runCommand(3, "changeSong");
                Computer  comp1      = MissionFunctions.findComp("corp0#IS");
                Computer  comp2      = MissionFunctions.findComp("corp0#MF");
                Computer  comp3      = MissionFunctions.findComp("corp0#BU");
                FileEntry fileEntry1 = new FileEntry(Computer.generateBinaryString(5000), "HacknetOS.rar");
                FileEntry fileEntry2 = new FileEntry(Computer.generateBinaryString(4000), "HacknetOS_Data.xnb");
                FileEntry fileEntry3 = new FileEntry(Computer.generateBinaryString(4000), "HacknetOS_Content.xnb");
                Folder    folder1    = comp1.files.root.folders[2];
                folder1.files.Add(fileEntry1);
                folder1.files.Add(fileEntry2);
                folder1.files.Add(fileEntry3);
                Folder folder2 = comp2.files.root.folders[2];
                folder2.files.Add(fileEntry1);
                folder2.files.Add(fileEntry2);
                folder2.files.Add(fileEntry3);
                FileEntry fileEntry4 = new FileEntry(fileEntry1.data, fileEntry1.name + "_backup");
                FileEntry fileEntry5 = new FileEntry(fileEntry2.data, fileEntry2.name + "_backup");
                FileEntry fileEntry6 = new FileEntry(fileEntry3.data, fileEntry3.name + "_backup");
                Folder    folder3    = comp3.files.root.folders[2];
                folder3.files.Add(fileEntry4);
                folder3.files.Add(fileEntry5);
                folder3.files.Add(fileEntry6);
                comp1.traceTime           = Computer.BASE_TRACE_TIME * 7.5f;
                comp3.traceTime           = Computer.BASE_TRACE_TIME * 7.5f;
                comp2.traceTime           = Computer.BASE_TRACE_TIME * 7.5f;
                comp2.portsNeededForCrack = 3;
                comp1.portsNeededForCrack = 2;
                comp3.portsNeededForCrack = 2;
                Folder folder4 = MissionFunctions.findComp("entropy01").files.root.folders[2];
                folder4.files.Add(new FileEntry(PortExploits.crackExeData[25], "SMTPoverflow.exe"));
                folder4.files.Add(new FileEntry(PortExploits.crackExeData[80], "WebServerWorm.exe"));
            }
            else if (name.Equals("entropyAddSMTPCrack"))
            {
                Folder folder = MissionFunctions.findComp("entropy01").files.root.folders[2];
                bool   flag   = false;
                for (int index = 0; index < folder.files.Count; ++index)
                {
                    if (folder.files[index].data == PortExploits.crackExeData[25] || folder.files[index].name == "SMTPoverflow.exe")
                    {
                        flag = true;
                    }
                }
                if (!flag)
                {
                    folder.files.Add(new FileEntry(PortExploits.crackExeData[25], Utils.GetNonRepeatingFilename("SMTPoverflow", ".exe", folder)));
                }
                MissionFunctions.os.Flags.AddFlag("ThemeHackTransitionAssetsAdded");
            }
            else if (name.Equals("transitionToBitMissions"))
            {
                if (Settings.isDemoMode)
                {
                    MissionFunctions.runCommand(6, "changeSong");
                    if (Settings.isPressBuildDemo)
                    {
                        ComputerLoader.loadMission("Content/Missions/Demo/PressBuild/DemoMission01.xml", false);
                    }
                    else
                    {
                        ComputerLoader.loadMission("Content/Missions/Demo/AvconDemo.xml", false);
                    }
                }
                else
                {
                    ComputerLoader.loadMission("Content/Missions/BitMission0.xml", false);
                }
            }
            else if (name.Equals("entropySendCSECInvite"))
            {
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(6.0), (Action)(() => ComputerLoader.loadMission("Content/Missions/MainHub/Intro/Intro01.xml", false)));
            }
            else if (name.Equals("hubBitSetComplete01"))
            {
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(4.0), (Action)(() => MissionFunctions.runCommand(1, "addRank")));
                MissionFunctions.runCommand(3, "changeSong");
                MissionFunctions.os.Flags.AddFlag("csecBitSet01Complete");
            }
            else if (name.Equals("enTechEnableOfflineBackup"))
            {
                Programs.getComputer(MissionFunctions.os, "EnTechOfflineBackup");
                MissionFunctions.os.Flags.AddFlag("VaporSequencerEnabled");
                Folder folder1 = MissionFunctions.findComp("mainHubAssets").files.root.searchForFolder("bin");
                Folder folder2 = folder1.searchForFolder("Sequencer");
                if (folder2 == null)
                {
                    folder2 = new Folder("Sequencer");
                    folder1.folders.Add(folder2);
                }
                if (folder2.searchForFile("Sequencer.exe") != null)
                {
                    return;
                }
                folder2.files.Add(new FileEntry(PortExploits.crackExeData[17], "Sequencer.exe"));
            }
            else if (name.Equals("rudeNaixResponse"))
            {
                AchievementsManager.Unlock("rude_response", false);
            }
            else if (name.Equals("assignPlayerToHubServerFaction"))
            {
                MissionFunctions.os.allFactions.setCurrentFaction("hub", MissionFunctions.os);
                Computer         computer   = Programs.getComputer(MissionFunctions.os, "mainHub");
                MissionHubServer daemon     = (MissionHubServer)computer.getDaemon(typeof(MissionHubServer));
                UserDetail       userDetail = new UserDetail(MissionFunctions.os.defaultUser.name, "reptile", (byte)3);
                computer.addNewUser(computer.ip, userDetail);
                daemon.addUser(userDetail);
                MissionFunctions.os.homeNodeID        = "mainHub";
                MissionFunctions.os.homeAssetServerID = "mainHubAssets";
                MissionFunctions.runCommand(3, "changeSong");
                MissionFunctions.os.Flags.AddFlag("CSEC_Member");
                AchievementsManager.Unlock("progress_csec", false);
                if (!MissionFunctions.os.HasLoadedDLCContent || !Settings.EnableDLC || MissionFunctions.os.Flags.HasFlag("dlc_complete"))
                {
                    return;
                }
                daemon.AddMissionToListings("Content/DLC/Missions/BaseGameConnectors/Missions/CSEC_DLCConnectorIntro.xml", 1);
            }
            else if (name.Equals("assignPlayerToEntropyFaction"))
            {
                MissionFunctions.runCommand(6, "changeSong");
                MissionFunctions.os.homeNodeID        = "entropy00";
                MissionFunctions.os.homeAssetServerID = "entropy01";
                AchievementsManager.Unlock("progress_entropy", false);
            }
            else if (name.Equals("assignPlayerToLelzSec"))
            {
                MissionFunctions.os.homeNodeID        = "lelzSecHub";
                MissionFunctions.os.homeAssetServerID = "lelzSecHub";
                MissionFunctions.os.Flags.AddFlag("LelzSec_Member");
                AchievementsManager.Unlock("progress_lelz", false);
            }
            else if (name.Equals("lelzSecVictory"))
            {
                AchievementsManager.Unlock("secret_path_complete", false);
            }
            else if (name.Equals("demoFinalMissionEnd"))
            {
                MissionFunctions.os.exes.Clear();
                PostProcessor.EndingSequenceFlashOutActive             = true;
                PostProcessor.EndingSequenceFlashOutPercentageComplete = 1f;
                MusicManager.stop();
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(0.2), (Action)(() => MissionFunctions.os.content.Load <SoundEffect>("Music/Ambient/spiral_gauge_down").Play()));
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(3.0), (Action)(() =>
                {
                    PostProcessor.dangerModeEnabled = false;
                    PostProcessor.dangerModePercentComplete = 0.0f;
                    MissionFunctions.os.ExitScreen();
                    MissionFunctions.os.ScreenManager.AddScreen((GameScreen) new DemoEndScreen());
                }));
            }
            else if (name.Equals("demoFinalMissionEndDLC"))
            {
                if (!Settings.isDemoMode)
                {
                    return;
                }
                MissionFunctions.os.exes.Clear();
                PostProcessor.EndingSequenceFlashOutActive             = true;
                PostProcessor.EndingSequenceFlashOutPercentageComplete = 1f;
                MusicManager.stop();
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(0.0), (Action)(() => MissionFunctions.os.content.Load <SoundEffect>("SFX/BrightFlash").Play()));
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(0.4), (Action)(() => MissionFunctions.os.content.Load <SoundEffect>("SFX/TraceKill").Play()));
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(1.6), (Action)(() =>
                {
                    MusicManager.playSongImmediatley("DLC/Music/DreamHead");
                    PostProcessor.dangerModeEnabled = false;
                    PostProcessor.dangerModePercentComplete = 0.0f;
                    MissionFunctions.os.ScreenManager.AddScreen((GameScreen) new DemoEndScreen()
                    {
                        StopsMusic = false,
                        IsDLCDemoScreen = true
                    });
                    MissionFunctions.os.ExitScreen();
                }));
            }
            else if (name.Equals("demoFinalMissionStart"))
            {
                MissionFunctions.os.Flags.AddFlag("DemoSequencerEnabled");
                MusicManager.transitionToSong("Music/Ambient/dark_drone_008");
            }
            else if (name.Equals("CSECTesterGameWorldSetup"))
            {
                for (int index = 0; index < PortExploits.services.Count && index < 4; ++index)
                {
                    MissionFunctions.os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[PortExploits.portNums[index]], PortExploits.cracks[PortExploits.portNums[index]]));
                }
                for (int index = 0; index < 4; ++index)
                {
                    Computer c = new Computer("DebugShell" + (object)index, NetworkMap.generateRandomIP(), MissionFunctions.os.netMap.getRandomPosition(), 0, (byte)2, MissionFunctions.os);
                    c.adminIP = MissionFunctions.os.thisComputer.adminIP;
                    MissionFunctions.os.netMap.nodes.Add(c);
                    MissionFunctions.os.netMap.discoverNode(c);
                }
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(0.2), (Action)(() =>
                {
                    MissionFunctions.os.allFactions.setCurrentFaction("entropy", MissionFunctions.os);
                    MissionFunctions.os.currentMission = (ActiveMission)null;
                    MissionFunctions.os.netMap.discoverNode(Programs.getComputer(MissionFunctions.os, "entropy00"));
                    MissionFunctions.os.netMap.discoverNode(Programs.getComputer(MissionFunctions.os, "entropy01"));
                }));
            }
            else if (name.Equals("EntropyFastFowardSetup"))
            {
                MissionFunctions.os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[22], PortExploits.cracks[22]));
                MissionFunctions.os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[21], PortExploits.cracks[21]));
                for (int index = 0; index < 3; ++index)
                {
                    Computer c = new Computer("DebugShell" + (object)index, NetworkMap.generateRandomIP(), MissionFunctions.os.netMap.getRandomPosition(), 0, (byte)2, MissionFunctions.os);
                    c.adminIP = MissionFunctions.os.thisComputer.adminIP;
                    MissionFunctions.os.netMap.nodes.Add(c);
                    MissionFunctions.os.netMap.discoverNode(c);
                }
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(0.2), (Action)(() =>
                {
                    MissionFunctions.os.allFactions.setCurrentFaction("entropy", MissionFunctions.os);
                    MissionFunctions.os.currentMission = (ActiveMission)null;
                    MissionFunctions.os.netMap.discoverNode(Programs.getComputer(MissionFunctions.os, "entropy00"));
                    MissionFunctions.os.netMap.discoverNode(Programs.getComputer(MissionFunctions.os, "entropy01"));
                    Computer computer = Programs.getComputer(MissionFunctions.os, "entropy01");
                    UserDetail user = computer.users[0];
                    user.known = true;
                    computer.users[0] = user;
                    MissionFunctions.os.allFactions.factions[MissionFunctions.os.allFactions.currentFaction].playerValue = 2;
                    MissionFunctions.os.delayer.Post(ActionDelayer.Wait(0.2), (Action)(() =>
                    {
                        MissionFunctions.os.Flags.AddFlag("eosPathStarted");
                        ComputerLoader.loadMission("Content/Missions/Entropy/StartingSet/eosMissions/eosIntroDelayer.xml", false);
                    }));
                }));
            }
            else if (name.Equals("CSECFastFowardSetup"))
            {
                MissionFunctions.os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[22], PortExploits.cracks[22]));
                MissionFunctions.os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[21], PortExploits.cracks[21]));
                for (int index = 0; index < 3; ++index)
                {
                    Computer c = new Computer("DebugShell" + (object)index, NetworkMap.generateRandomIP(), MissionFunctions.os.netMap.getRandomPosition(), 0, (byte)2, MissionFunctions.os);
                    c.adminIP = MissionFunctions.os.thisComputer.adminIP;
                    MissionFunctions.os.netMap.nodes.Add(c);
                    MissionFunctions.os.netMap.discoverNode(c);
                }
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(0.2), (Action)(() =>
                {
                    MissionFunctions.runCommand(0, "assignPlayerToHubServerFaction");
                    MissionFunctions.os.currentMission = (ActiveMission)null;
                    MissionFunctions.os.netMap.discoverNode(Programs.getComputer(MissionFunctions.os, "mainHub"));
                    MissionFunctions.os.netMap.discoverNode(Programs.getComputer(MissionFunctions.os, "mainHubAssets"));
                    Computer computer = Programs.getComputer(MissionFunctions.os, "mainHubAssets");
                    UserDetail user = computer.users[0];
                    user.known = true;
                    computer.users[0] = user;
                }));
            }
            else if (name.Equals("csecAddTraceKill"))
            {
                Folder folder = MissionFunctions.findComp("mainHubAssets").files.root.searchForFolder("bin");
                Folder f      = folder.searchForFolder("TK");
                if (f == null)
                {
                    f = new Folder("TK");
                    folder.folders.Add(f);
                }
                f.files.Add(new FileEntry(FileEncrypter.EncryptString(PortExploits.crackExeData[12], "Vapor Trick Enc.", "NULL", "dx122DX", ".exe"), Utils.GetNonRepeatingFilename("TraceKill", ".dec", f)));
                MissionFunctions.os.Flags.AddFlag("bitPathStarted");
                MissionFunctions.runCommand(10, "changeSong");
            }
            else if (name.Equals("junebugComplete"))
            {
                Computer computer = Programs.getComputer(MissionFunctions.os, "pacemaker01");
                if (computer != null)
                {
                    HeartMonitorDaemon daemon = (HeartMonitorDaemon)computer.getDaemon(typeof(HeartMonitorDaemon));
                    if (daemon != null)
                    {
                        daemon.ForceStopBeepSustainSound();
                    }
                }
                MissionFunctions.runCommand(1, "addRank");
            }
            else if (name.Equals("eosIntroMissionSetup"))
            {
                MissionFunctions.findComp("entropy01").files.root.searchForFolder("bin").files.Add(new FileEntry(PortExploits.crackExeData[13], "eosDeviceScan.exe"));
                MissionFunctions.os.delayer.Post(ActionDelayer.Wait(8.0), (Action)(() =>
                {
                    string email = MailServer.generateEmail("Fwd: eOS Stuff", Utils.readEntireFile("Content/Post/eosScannerMail.txt"), "vtfx", new List <string>((IEnumerable <string>) new string[1] {
                        "note#%#" + LocaleTerms.Loc("eOS Security Basics") + "#%#" + Utils.readEntireFile("Content/LocPost/eOSNote.txt")
                    }));
                    ((MailServer)MissionFunctions.os.netMap.mailServer.getDaemon(typeof(MailServer))).addMail(email, MissionFunctions.os.defaultUser.name);
                    MissionFunctions.os.saveGame();
                }));
                MissionFunctions.runCommand(4, "changeSong");
                MissionFunctions.os.saveGame();
            }
            else if (name.Equals("eosIntroEndFunc"))
            {
                MissionFunctions.runCommand(1, "addRank");
                MissionListingServer daemon         = (MissionListingServer)MissionFunctions.findComp("entropy00").getDaemon(typeof(MissionListingServer));
                List <ActiveMission> branchMissions = MissionFunctions.os.branchMissions;
                ActiveMission        m = (ActiveMission)ComputerLoader.readMission("Content/Missions/Entropy/StartingSet/eosMissions/eosAddedMission.xml");
                daemon.addMisison(m, false);
                MissionFunctions.os.branchMissions = branchMissions;
            }
            else if (name.Equals("changeSongDLC"))
            {
                switch (value)
                {
                case 2:
                    MusicManager.transitionToSong("DLC\\Music\\snidelyWhiplash");
                    break;

                case 3:
                    MusicManager.transitionToSong("DLC\\Music\\Slow_Motion");
                    break;

                case 4:
                    MusicManager.transitionToSong("DLC\\Music\\World_Chase");
                    break;

                case 5:
                    MusicManager.transitionToSong("DLC\\Music\\HOME_Resonance");
                    break;

                case 6:
                    MusicManager.transitionToSong("DLC\\Music\\Remi_Finale");
                    break;

                case 7:
                    MusicManager.transitionToSong("DLC\\Music\\RemiDrone");
                    break;

                case 8:
                    MusicManager.transitionToSong("DLC\\Music\\DreamHead");
                    break;

                case 9:
                    MusicManager.transitionToSong("DLC\\Music\\Userspacelike");
                    break;

                case 10:
                    MusicManager.transitionToSong("DLC\\Music\\CrashTrack");
                    break;

                default:
                    MusicManager.transitionToSong("DLC\\Music\\Remi2");
                    break;
                }
            }
            else if (name.Equals("scanAndStartDLCVenganceHack"))
            {
                Computer comp = MissionFunctions.findComp("dAttackTarget");
                if (comp == null)
                {
                    return;
                }
                Folder folder = comp.files.root.searchForFolder("log");
                bool   flag   = false;
                for (int index = 0; index < folder.files.Count; ++index)
                {
                    if (folder.files[index].data.Contains(MissionFunctions.os.thisComputer.ip))
                    {
                        SARunFunction saRunFunction = new SARunFunction()
                        {
                            DelayHost = "dhs", FunctionName = "triggerDLCHackRevenge", FunctionValue = 1
                        };
                        ((DLCHubServer)Programs.getComputer(MissionFunctions.os, "dhs").getDaemon(typeof(DLCHubServer))).DelayedActions.AddAction((SerializableAction)saRunFunction, 16f);
                        break;
                    }
                }
                if (!flag)
                {
                    MissionFunctions.runCommand(4, "changeSongDLC");
                }
            }
            else if (name.Equals("triggerDLCHackRevenge"))
            {
                try
                {
                    HackerScriptExecuter.runScript("DLC/ActionScripts/Hackers/SystemHack.txt", (object)MissionFunctions.os, (string)null, (string)null);
                }
                catch (Exception ex)
                {
                    if (!Settings.recoverFromErrorsSilently)
                    {
                        throw ex;
                    }
                    MissionFunctions.os.write("CAUTION: UNSYNDICATED OUTSIDE CONNECTION ATTEMPT");
                    MissionFunctions.os.write("RECOVERED FROM CONNECTION SUBTERFUGE SUCCESSFULLY");
                    Console.WriteLine("Critical error loading hacker script - aborting\r\n" + Utils.GenerateReportFromException(ex));
                }
            }
            else if (name.Equals("activateAircraftStatusOverlay"))
            {
                MissionFunctions.os.AircraftInfoOverlay.Activate();
                MissionFunctions.os.AircraftInfoOverlay.IsMonitoringDLCEndingCases = true;
            }
            else if (name.Equals("activateAircraftStatusOverlayLabyrinthsMonitoring"))
            {
                MissionFunctions.os.AircraftInfoOverlay.IsMonitoringDLCEndingCases = true;
            }
            else if (name.Equals("deActivateAircraftStatusOverlay"))
            {
                MissionFunctions.os.AircraftInfoOverlay.IsActive = false;
                MissionFunctions.os.AircraftInfoOverlay.IsMonitoringDLCEndingCases = false;
                MissionFunctions.os.Flags.AddFlag("AircraftInfoOverlayDeactivated");
            }
            else if (name.Equals("defAttackAircraft"))
            {
                Computer computer = Programs.getComputer(MissionFunctions.os, "dair_crash");
                Folder   folder   = computer.files.root.searchForFolder("FlightSystems");
                for (int index = 0; index < folder.files.Count; ++index)
                {
                    if (folder.files[index].name == "747FlightOps.dll")
                    {
                        folder.files.RemoveAt(index);
                        break;
                    }
                }
                ((AircraftDaemon)computer.getDaemon(typeof(AircraftDaemon))).StartReloadFirmware();
                if (MissionFunctions.os.AircraftInfoOverlay.IsActive)
                {
                    return;
                }
                MissionFunctions.os.AircraftInfoOverlay.Activate();
                MissionFunctions.os.AircraftInfoOverlay.IsMonitoringDLCEndingCases = true;
            }
            else if (name.Equals("playAirlineCrashSongSequence"))
            {
                MusicManager.playSongImmediatley("DLC\\Music\\Remi_Finale");
                MediaPlayer.IsRepeating = false;
            }
            else if (name.Equals("flashUI"))
            {
                MissionFunctions.os.warningFlash();
            }
            else if (name.Equals("addRankSilent"))
            {
                MissionFunctions.os.currentFaction.addValue(value, (object)MissionFunctions.os);
            }
            else if (name.StartsWith("addRankFaction:"))
            {
                string str = name.Substring("addRankFaction:".Length);
                foreach (KeyValuePair <string, Faction> faction in MissionFunctions.os.allFactions.factions)
                {
                    if (faction.Value.idName.ToLower() == str.ToLower())
                    {
                        faction.Value.addValue(value, (object)MissionFunctions.os);
                        break;
                    }
                }
            }
            else if (name.StartsWith("setHubServer:"))
            {
                string str = name.Substring("setHubServer:".Length);
                MissionFunctions.os.homeNodeID = str;
            }
            else if (name.StartsWith("setAssetServer:"))
            {
                string str = name.Substring("setAssetServer:".Length);
                MissionFunctions.os.homeAssetServerID = str;
            }
            else if (name.StartsWith("playCustomSong:"))
            {
                string songName = Utils.GetFileLoadPrefix() + name.Substring("playCustomSong:".Length);
                if (songName.EndsWith(".ogg"))
                {
                    songName = songName.Substring(0, songName.Length - ".ogg".Length);
                }
                if (songName.StartsWith("Content"))
                {
                    songName = songName.Substring("Content/".Length);
                }
                else if (songName.StartsWith("Extensions"))
                {
                    songName = "../" + songName;
                }
                MusicManager.transitionToSong(songName);
            }
            else if (name.StartsWith("playCustomSongImmediatley:"))
            {
                string songname = Utils.GetFileLoadPrefix() + name.Substring("playCustomSongImmediatley:".Length);
                if (songname.EndsWith(".ogg"))
                {
                    songname = songname.Substring(0, songname.Length - ".ogg".Length);
                }
                if (songname.StartsWith("Content"))
                {
                    songname = songname.Substring("Content/".Length);
                }
                else if (songname.StartsWith("Extensions"))
                {
                    songname = "../" + songname;
                }
                MusicManager.playSongImmediatley(songname);
            }
            else
            {
                if (OS.TestingPassOnly && !string.IsNullOrWhiteSpace(name))
                {
                    throw new FormatException("No Command Function " + name);
                }
                if (MissionFunctions.ReportErrorInCommand != null)
                {
                    MissionFunctions.ReportErrorInCommand("No command found for \"" + name + "\" with value \"" + (object)value + "\"");
                }
            }
        }
Example #13
0
        public override void Draw(float t)
        {
            base.Draw(t);
            drawOutline();
            drawTarget("app:");
            var rectangle = Utils.InsetRectangle(GetContentAreaDest(), 1);
            var amount    = os.warningFlashTimer / OS.WARNING_FLASH_TIME;
            var minHeight = 2f;

            if (amount > 0.0)
            {
                minHeight += amount * (rectangle.Height - minHeight);
            }
            var drawColor = Color.Lerp(Utils.AddativeWhite * 0.5f, Utils.AddativeRed, amount);

            bars.Draw(spriteBatch, GetContentAreaDest(), minHeight, 4f, 1f, drawColor);
            switch (state)
            {
            case SequencerExeState.Unavaliable:
                spriteBatch.Draw(Utils.white, rectangle, Color.Black * 0.5f);
                var dest = Utils.InsetRectangle(rectangle, 6);
                if (!isExiting)
                {
                    TextItem.doFontLabelToSize(dest, "LINK UNAVAILABLE", GuiData.titlefont, Utils.AddativeWhite);
                }
                var destinationRectangle1 = dest;
                destinationRectangle1.Y     += destinationRectangle1.Height - 20;
                destinationRectangle1.Height = 20;
                if (isExiting)
                {
                    break;
                }
                GuiData.spriteBatch.Draw(Utils.white, destinationRectangle1, Color.Black * 0.5f);
                if (
                    !Button.doButton(32711803, destinationRectangle1.X, destinationRectangle1.Y,
                                     destinationRectangle1.Width, destinationRectangle1.Height, "Exit", os.lockedColor))
                {
                    break;
                }
                isExiting = true;
                break;

            case SequencerExeState.AwaitingActivation:
                var height = 30;
                var destinationRectangle2 = new Rectangle(this.bounds.X + 1,
                                                          this.bounds.Y + this.bounds.Height / 2 - height, this.bounds.Width - 2, height * 2);
                spriteBatch.Draw(Utils.white, destinationRectangle2, Color.Black * 0.92f);
                if (
                    !Button.doButton(8310101, this.bounds.X + 10, this.bounds.Y + this.bounds.Height / 2 - height / 2,
                                     this.bounds.Width - 20, height, "ACTIVATE", os.highlightColor))
                {
                    break;
                }
                stateTimer             = 0.0f;
                state                  = SequencerExeState.SpinningUp;
                bars.MinLineChangeTime = 0.1f;
                bars.MaxLineChangeTime = 1f;
                originalTheme          = ThemeManager.currentTheme;
                MusicManager.FADE_TIME = 0.6f;
                oldSongName            = MusicManager.currentSongName;
                MusicManager.transitionToSong("Music\\Roller_Mobster_Clipped");
                MediaPlayer.IsRepeating = false;
                targetComp = Programs.getComputer(os, targetID);
                var webServerDaemon = (WebServerDaemon)targetComp.getDaemon(typeof(WebServerDaemon));
                if (webServerDaemon == null)
                {
                    break;
                }
                webServerDaemon.LoadWebPage("index.html");
                break;

            case SequencerExeState.SpinningUp:
                var bounds = rectangle;
                bounds.Height = (int)(bounds.Height * (stateTimer / (double)SPIN_UP_TIME));
                bounds.Y      = rectangle.Y + rectangle.Height - bounds.Height + 1;
                bounds.Width += 4;
                bars.Draw(spriteBatch, bounds, minHeight, 4f, 1f, os.brightLockedColor);
                break;

            case SequencerExeState.Active:
                spriteBatch.Draw(Utils.white, GetContentAreaDest(), Color.Black * 0.5f);
                TextItem.doFontLabelToSize(GetContentAreaDest(), " G O   G O   G O ", GuiData.titlefont,
                                           Color.Lerp(Utils.AddativeRed, os.brightLockedColor, Math.Min(1f, stateTimer / 2f)));
                DrawActiveState();
                break;
            }
        }