Ejemplo n.º 1
0
        private void UpdateUIFlickerIn()
        {
            float   num   = Math.Min(1f, this.percentageThroughThisState * (float)(1.0 / 0.400000005960464));
            OSTheme theme = OSTheme.Custom;

            if ((double)this.percentageThroughThisState < 0.990000009536743)
            {
                if ((double)Utils.randm(1f) < (double)num)
                {
                    ThemeManager.switchTheme((object)this.os, theme);
                }
                else
                {
                    ThemeManager.switchThemeColors(this.os, this.originalTheme);
                    ThemeManager.loadThemeBackground(this.os, this.originalTheme);
                    ThemeManager.currentTheme = this.originalTheme;
                }
            }
            PostProcessor.EndingSequenceFlashOutActive             = true;
            PostProcessor.EndingSequenceFlashOutPercentageComplete = 1f - num;
            if ((double)this.percentageThroughThisState <= 0.699999988079071)
            {
                return;
            }
            this.AddRadialMailLine();
        }
Ejemplo n.º 2
0
        public static OSTheme getThemeForDataString(string data)
        {
            if (!data.Contains(ThemeManager.CustomThemeIDSeperator))
            {
                return(ThemeManager.fileData.FirstOrDefault <KeyValuePair <OSTheme, string> >((Func <KeyValuePair <OSTheme, string>, bool>)(x => x.Value == data)).Key);
            }
            string[] seperated = data.Split(new string[1] {
                ThemeManager.CustomThemeIDSeperator
            }, StringSplitOptions.RemoveEmptyEntries);
            OSTheme key = ThemeManager.fileData.FirstOrDefault <KeyValuePair <OSTheme, string> >((Func <KeyValuePair <OSTheme, string>, bool>)(x => x.Value == seperated[0])).Key;

            try
            {
                string str1 = FileEncrypter.DecryptString(seperated[1], "")[2];
                string str2 = "Content/";
                if (Settings.IsInExtensionMode)
                {
                    str2 = ExtensionLoader.ActiveExtensionInfo.FolderPath + "/";
                }
                ThemeManager.LastLoadedCustomTheme = CustomTheme.Deserialize(str2 + str1);
            }
            catch (Exception ex)
            {
                ThemeManager.LastLoadedCustomTheme = (CustomTheme)null;
                return(OSTheme.TerminalOnlyBlack);
            }
            return(key);
        }
Ejemplo n.º 3
0
 public void StartThemeSwitch(float time, OSTheme newTheme, object osobj, string customThemePath = null)
 {
     this.oldTheme       = ThemeManager.currentTheme;
     this.oldThemePath   = this.oldTheme == OSTheme.Custom ? ThemeManager.LastLoadedCustomThemePath : (string)null;
     this.oldCustomTheme = this.oldTheme == OSTheme.Custom ? ThemeManager.LastLoadedCustomTheme : (CustomTheme)null;
     if ((double)this.themeSwapTimeRemaining > 0.0)
     {
         this.CompleteThemeSwap(osobj);
     }
     this.originalThemeSwapTime = this.themeSwapTimeRemaining = time;
     this.newTheme     = newTheme;
     this.newThemePath = customThemePath;
     try
     {
         if ((double)time <= 0.0)
         {
             this.CompleteThemeSwap(osobj);
         }
         else if (this.newThemePath != null)
         {
             ThemeManager.switchTheme(osobj, this.newThemePath);
             this.newCustomTheme = ThemeManager.LastLoadedCustomTheme;
         }
         else
         {
             this.newCustomTheme = (CustomTheme)null;
         }
     }
     catch (Exception ex)
     {
         time = this.themeSwapTimeRemaining = 0.0f;
         throw ex;
     }
 }
Ejemplo n.º 4
0
        public static Color GetRepresentativeColorForTheme(OSTheme theme)
        {
            switch (theme)
            {
            case OSTheme.TerminalOnlyBlack:
                return(Utils.VeryDarkGray);

            case OSTheme.HacknetTeal:
                return(new Color(59, 134, 134, byte.MaxValue));

            case OSTheme.HacknetYellow:
                return(new Color(186, 98, 9, byte.MaxValue));

            case OSTheme.HackerGreen:
                return(new Color(135, 222, 109, 200));

            case OSTheme.HacknetWhite:
                return(new Color(185, 219, byte.MaxValue, byte.MaxValue));

            case OSTheme.HacknetPurple:
                return(new Color(111, 89, 171, byte.MaxValue));

            case OSTheme.HacknetMint:
                return(new Color(35, 158, 121));

            default:
                return(new Color(0, 139, 199, byte.MaxValue));
            }
        }
Ejemplo n.º 5
0
 public static void switchTheme(object osObject, OSTheme theme)
 {
     var os = (OS) osObject;
     switchThemeColors(os, theme);
     loadThemeBackground(os, theme);
     switchThemeLayout(os, theme);
     currentTheme = theme;
 }
Ejemplo n.º 6
0
        public static void switchTheme(object osObject, OSTheme theme)
        {
            var os = (OS)osObject;

            switchThemeColors(os, theme);
            loadThemeBackground(os, theme);
            switchThemeLayout(os, theme);
            currentTheme = theme;
        }
Ejemplo n.º 7
0
 private void PrepareForUIBreakdown()
 {
     this.originalTheme = ThemeManager.currentTheme;
     ThemeManager.setThemeOnComputer((object)this.os.thisComputer, "DLC/Themes/MiamiTheme.xml");
     ThemeManager.switchTheme((object)this.os, "DLC/Themes/MiamiTheme.xml");
     this.timeBetweenNodeRemovals = DLCIntroExe.FlickeringTime / 2f / (float)this.os.netMap.visibleNodes.Count;
     this.os.netMap.CleanVisibleListofDuplicates();
     this.originalTopBarIconsColor = this.os.topBarIconsColor;
 }
Ejemplo n.º 8
0
 public HexClockExe(Rectangle location, OS operatingSystem, string[] p)
     : base(location, operatingSystem)
 {
     name           = "HexClock";
     ramCost        = 55;
     IdentifierName = "HexClock";
     targetIP       = os.thisComputer.ip;
     theme          = ThemeManager.currentTheme;
 }
Ejemplo n.º 9
0
 public HexClockExe(Rectangle location, OS operatingSystem, string[] p)
     : base(location, operatingSystem)
 {
     name = "HexClock";
     ramCost = 55;
     IdentifierName = "HexClock";
     targetIP = os.thisComputer.ip;
     theme = ThemeManager.currentTheme;
 }
Ejemplo n.º 10
0
        public static void setThemeOnComputer(object computerObject, OSTheme theme)
        {
            var folder = ((Computer)computerObject).files.root.searchForFolder("sys");

            if (folder.containsFile("x-server.sys"))
            {
                folder.searchForFile("x-server.sys").data = getThemeDataString(theme);
            }
            else
            {
                var fileEntry = new FileEntry(getThemeDataString(theme), "x-server.sys");
                folder.files.Add(fileEntry);
            }
        }
Ejemplo n.º 11
0
        public void Update(float dt, object osobj)
        {
            OS os = (OS)osobj;

            if ((double)this.themeSwapTimeRemaining > 0.0)
            {
                this.themeSwapTimeRemaining -= dt;
                if ((double)this.themeSwapTimeRemaining <= 0.0)
                {
                    this.CompleteThemeSwap((object)os);
                    return;
                }
                bool    flag            = (double)Utils.randm(1f) > (double)this.themeSwapTimeRemaining / (double)this.originalThemeSwapTime;
                OSTheme theme           = flag ? this.newTheme : this.oldTheme;
                string  customThemePath = flag ? this.newThemePath : this.oldThemePath;
                ThemeManager.LastLoadedCustomTheme = flag ? this.newCustomTheme : this.oldCustomTheme;
                if (customThemePath != null)
                {
                    ThemeManager.switchTheme((object)os, customThemePath);
                }
                else
                {
                    ThemeManager.switchTheme((object)os, theme);
                }
            }
            if (this.ScreenBleedActive)
            {
                this.ScreenBleedTimeLeft -= dt;
                PostProcessor.dangerModePercentComplete = Math.Max(0.0f, Math.Min((float)(1.0 - (double)this.ScreenBleedTimeLeft / (double)this.ScreenBleedStartTime), 1f));
                PostProcessor.dangerModeEnabled         = true;
                if ((double)this.ScreenBleedTimeLeft <= 0.0)
                {
                    this.ScreenBleedActive = false;
                    PostProcessor.dangerModePercentComplete = 0.0f;
                    PostProcessor.dangerModeEnabled         = false;
                    if (!string.IsNullOrWhiteSpace(this.screenBleedCompleteAction))
                    {
                        RunnableConditionalActions.LoadIntoOS(this.screenBleedCompleteAction, (object)os);
                    }
                }
                else
                {
                    os.postFXDrawActions += (Action)(() => TraceDangerSequence.DrawCountdownOverlay(Utils.CheckStringIsTitleRenderable(this.screenBleedTitle) ? GuiData.titlefont : GuiData.font, GuiData.smallfont, (object)os, this.screenBleedTitle, this.screenBleedL1, this.screenBleedL2, this.screenBleedL3));
                }
            }
        }
Ejemplo n.º 12
0
 public HexClockExe(Rectangle location, OS operatingSystem, string[] p)
     : base(location, operatingSystem)
 {
     this.name           = "HexClock";
     this.ramCost        = 55;
     this.IdentifierName = "HexClock";
     this.targetIP       = this.os.thisComputer.ip;
     if (p.Length > 1 && (p[1].ToLower().StartsWith("-s") || p[1].ToLower().StartsWith("-n")))
     {
         this.stopUIChange = true;
     }
     else
     {
         this.os.write("HexClock Running. Use -s or -n for restricted mode\n ");
     }
     this.theme = ThemeManager.currentTheme;
 }
Ejemplo n.º 13
0
        public override void Trigger(object os_obj)
        {
            OS os = (OS)os_obj;

            if ((double)this.Delay <= 0.0)
            {
                OSTheme result = OSTheme.Custom;
                if (!Enum.TryParse <OSTheme>(this.ThemePathOrName, out result))
                {
                    result = OSTheme.Custom;
                }
                try
                {
                    os.EffectsUpdater.StartThemeSwitch(this.FlickerInDuration, result, (object)os, result == OSTheme.Custom ? this.ThemePathOrName : (string)null);
                }
                catch (Exception ex)
                {
                    os.write(" ");
                    os.write("---------------------- ");
                    os.write("ERROR LOADING X-SERVER");
                    os.write(ex.ToString());
                    os.write(ex.Message);
                    string filename = ExtensionLoader.ActiveExtensionInfo.FolderPath + "/xserver_error.txt";
                    Utils.writeToFile("x-server load error for theme : " + this.ThemePathOrName + "\r\n." + Utils.GenerateReportFromException(ex), filename);
                    os.write("---------------------- ");
                    os.write("Full report saved to " + filename);
                    os.write("---------------------- ");
                    os.write(" ");
                }
            }
            else
            {
                Computer computer = Programs.getComputer(os, this.DelayHost);
                if (computer == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
Ejemplo n.º 14
0
        public static void switchTheme(object osObject, OSTheme theme)
        {
            OS os = (OS)osObject;

            if (theme == OSTheme.Custom)
            {
                string backgroundImageLoadPath = ThemeManager.customBackgroundImageLoadPath;
                ThemeManager.switchTheme((object)os, OSTheme.HacknetBlue);
                ThemeManager.customBackgroundImageLoadPath = backgroundImageLoadPath;
                ThemeManager.switchThemeLayout(os, ThemeManager.LastLoadedCustomTheme.GetThemeForLayout());
                ThemeManager.loadCustomThemeBackground(os, ThemeManager.LastLoadedCustomTheme.backgroundImagePath);
                ThemeManager.LastLoadedCustomTheme.LoadIntoOS((object)os);
            }
            else
            {
                ThemeManager.switchThemeColors(os, theme);
                ThemeManager.loadThemeBackground(os, theme);
                ThemeManager.switchThemeLayout(os, theme);
            }
            ThemeManager.currentTheme = theme;
            os.RefreshTheme();
        }
Ejemplo n.º 15
0
 public override void LoadContent()
 {
     base.LoadContent();
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     if (Settings.isPressBuildDemo)
     {
         targetID = "finalNodeDemo";
         flagForProgressionName = "DemoSequencerEnabled";
     }
     else
     {
         targetID = "EnTechOfflineBackup";
         flagForProgressionName = "VaporSequencerEnabled";
     }
     if (ThemeManager.currentTheme != OSTheme.HacknetWhite)
         return;
     targetTheme = OSTheme.HacknetBlue;
 }
Ejemplo n.º 16
0
        internal static void loadThemeBackground(OS os, OSTheme theme)
        {
            switch (theme)
            {
            case OSTheme.TerminalOnlyBlack:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/NoThemeWallpaper");
                break;

            case OSTheme.HacknetTeal:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/AbstractWaves");
                break;

            case OSTheme.HacknetYellow:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/DarkenedAway");
                break;

            case OSTheme.HackerGreen:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/GreenAbstract");
                break;

            case OSTheme.HacknetWhite:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/AwayTooLong");
                break;

            case OSTheme.HacknetPurple:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/BlueCirclesBackground");
                break;

            case OSTheme.HacknetMint:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/WaterWashGreen2");
                break;

            default:
                ThemeManager.backgroundImage = os.content.Load <Texture2D>("Themes/Razzamataz2");
                break;
            }
            ThemeManager.backgroundNeedsDisposal = false;
        }
Ejemplo n.º 17
0
        internal static bool SwitchToLastCustomTheme(object osObject, OSTheme theme)
        {
            if (theme == OSTheme.Custom)
            {
                lock (cacheLock)
                {
                    // just dont question it
                    var lastTheme = CachedThemes.BackingListHead?.Value;
                    if (lastTheme != null)
                    {
                        if (!lastTheme.Loaded)
                        {
                            lastTheme.Load(true);
                        }
                        lastTheme.ApplyTo((OS)osObject);
                    }
                }

                return(false);
            }

            return(true);
        }
Ejemplo n.º 18
0
 public override void LoadContent()
 {
     base.LoadContent();
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     nodeeffects.Add(new ConnectedNodeEffect(os, true));
     if (Settings.isPressBuildDemo)
     {
         targetID = "finalNodeDemo";
         flagForProgressionName = "DemoSequencerEnabled";
     }
     else
     {
         targetID = "EnTechOfflineBackup";
         flagForProgressionName = "VaporSequencerEnabled";
     }
     if (ThemeManager.currentTheme != OSTheme.HacknetWhite)
     {
         return;
     }
     targetTheme = OSTheme.HacknetBlue;
 }
Ejemplo n.º 19
0
        private static void switchThemeLayout(OS os, OSTheme theme)
        {
            int width1  = os.ScreenManager.GraphicsDevice.Viewport.Width;
            int height1 = os.ScreenManager.GraphicsDevice.Viewport.Height;
            int width2  = os.display.bounds.Width;
            int height2 = os.display.bounds.Height;

            switch (theme)
            {
            case OSTheme.TerminalOnlyBlack:
                Rectangle rectangle = new Rectangle(-100000, -100000, 16, 16);
                os.terminal.bounds = new Rectangle(0, 0, width1, height1);
                os.netMap.bounds   = rectangle;
                os.display.bounds  = rectangle;
                os.ram.bounds      = rectangle;
                break;

            case OSTheme.HackerGreen:
                int height3 = 205;
                int width3  = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.4442);
                int num1    = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.5558);
                int height4 = height1 - height3 - OS.TOP_BAR_HEIGHT - 6;
                os.terminal.Bounds = new Rectangle(width1 - width3 - RamModule.MODULE_WIDTH - 4, OS.TOP_BAR_HEIGHT, width3, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds   = new Rectangle(2, height1 - height3 - 2, num1 - 1, height3);
                os.display.Bounds  = new Rectangle(2, OS.TOP_BAR_HEIGHT, num1 - 2, height4);
                os.ram.Bounds      = new Rectangle(width1 - RamModule.MODULE_WIDTH - 2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.HacknetWhite:
                int height5 = 205;
                int width4  = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.4442);
                int width5  = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.5558);
                int height6 = height1 - height5 - OS.TOP_BAR_HEIGHT - 6;
                os.terminal.Bounds = new Rectangle(width1 - width4 - 2, OS.TOP_BAR_HEIGHT, width4, height6);
                os.netMap.Bounds   = new Rectangle(RamModule.MODULE_WIDTH + 4 + width5 + 4, height1 - height5 - 2, os.terminal.bounds.Width - 4, height5);
                os.display.Bounds  = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, width5, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.ram.Bounds      = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.HacknetMint:
                int height7 = 205;
                int num2    = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.5058);
                int width6  = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.4942);
                int height8 = height1 - height7 - OS.TOP_BAR_HEIGHT - 6;
                os.terminal.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, width6, height8);
                os.netMap.Bounds   = new Rectangle(RamModule.MODULE_WIDTH + 4, height1 - height7 - 2, width6 - 1, height7);
                os.display.Bounds  = new Rectangle(width1 - num2 - 2, OS.TOP_BAR_HEIGHT, num2 - 1, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.ram.Bounds      = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.Colamaeleon:
                int    height9  = (int)((double)height1 * 0.33);
                double num3     = 0.4;
                int    width7   = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * (1.0 - num3)) - 6;
                int    width8   = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * num3);
                int    height10 = height1 - height9 - OS.TOP_BAR_HEIGHT - 6 + 1;
                os.terminal.Bounds = new Rectangle(width1 - width7 - RamModule.MODULE_WIDTH - 4, OS.TOP_BAR_HEIGHT, width7, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds   = new Rectangle(2, OS.TOP_BAR_HEIGHT, width8, height9);
                os.display.Bounds  = new Rectangle(2, os.netMap.bounds.Y + os.netMap.bounds.Height + 3, width8, height10);
                os.ram.Bounds      = new Rectangle(width1 - RamModule.MODULE_WIDTH - 2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.GreenCompact:
                int height11 = 205;
                int num4     = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.4442);
                int num5     = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.5558);
                int height12 = height1 - height11 - OS.TOP_BAR_HEIGHT - 3;
                os.terminal.Bounds = new Rectangle(width1 - num4 - RamModule.MODULE_WIDTH - 4 - 2, OS.TOP_BAR_HEIGHT, num4 + 3, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds   = new Rectangle(1, height1 - height11 - 2, num5 - 1, height11);
                os.display.Bounds  = new Rectangle(1, OS.TOP_BAR_HEIGHT, num5 - 1, height12);
                os.ram.Bounds      = new Rectangle(width1 - RamModule.MODULE_WIDTH - 2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.Riptide:
                int    height13 = (int)((double)height1 * 0.33);
                double num6     = 0.51;
                int    num7     = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * (1.0 - num6)) - 2;
                int    width9   = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * num6);
                int    height14 = height1 - height13 - OS.TOP_BAR_HEIGHT - 6 + 2;
                os.terminal.Bounds = new Rectangle(width1 - num7 - RamModule.MODULE_WIDTH - 6, OS.TOP_BAR_HEIGHT, num7 + 2, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds   = new Rectangle(2, OS.TOP_BAR_HEIGHT, width9, height13);
                os.display.Bounds  = new Rectangle(2, os.netMap.bounds.Y + os.netMap.bounds.Height + 2, width9, height14);
                os.ram.Bounds      = new Rectangle(width1 - RamModule.MODULE_WIDTH - 2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.Riptide2:
                int    height15 = (int)((double)height1 * 0.33);
                double num8     = 0.55;
                int    width10  = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * (1.0 - num8)) - 6;
                int    num9     = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * num8);
                int    num10    = height1 - height15 - OS.TOP_BAR_HEIGHT - 6 + 1;
                int    x        = width1 - width10 - RamModule.MODULE_WIDTH - 4;
                os.display.Bounds  = new Rectangle(2, OS.TOP_BAR_HEIGHT, num9 + 4, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds   = new Rectangle(x, OS.TOP_BAR_HEIGHT, width10, height15);
                os.terminal.Bounds = new Rectangle(x, os.netMap.bounds.Y + os.netMap.bounds.Height, width10, num10 + 3);
                os.ram.Bounds      = new Rectangle(width1 - RamModule.MODULE_WIDTH - 2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            default:
                int height16 = 205;
                int width11  = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.4442);
                int num11    = (int)((double)(width1 - RamModule.MODULE_WIDTH - 6) * 0.5558) + 1;
                int height17 = height1 - height16 - OS.TOP_BAR_HEIGHT - 6;
                if (theme == OSTheme.HacknetPurple)
                {
                    height17 += 2;
                    ++num11;
                }
                os.terminal.Bounds = new Rectangle(width1 - width11 - 2, OS.TOP_BAR_HEIGHT, width11, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds   = new Rectangle(RamModule.MODULE_WIDTH + 4, height1 - height16 - 2, num11 - 2, height16);
                os.display.Bounds  = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, num11 - 2, height17);
                os.ram.Bounds      = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;
            }
            if (!ThemeManager.HasNeverSwappedThemeBefore && (os.display.bounds.Width == width2 && os.display.bounds.Height == height2))
            {
                return;
            }
            ThemeManager.webWidth                   = os.display.bounds.Width;
            ThemeManager.webHeight                  = os.display.bounds.Height;
            ThemeManager.framesTillWebUpdate        = 600;
            ThemeManager.HasNeverSwappedThemeBefore = false;
        }
Ejemplo n.º 20
0
 internal static void loadThemeBackground(OS os, OSTheme theme)
 {
     switch (theme)
     {
         case OSTheme.TerminalOnlyBlack:
             backgroundImage = os.content.Load<Texture2D>("Themes/NoThemeWallpaper");
             break;
         case OSTheme.HacknetTeal:
             backgroundImage = os.content.Load<Texture2D>("Themes/AbstractWaves");
             break;
         case OSTheme.HacknetYellow:
             backgroundImage = os.content.Load<Texture2D>("Themes/DarkenedAway");
             break;
         case OSTheme.HackerGreen:
             backgroundImage = os.content.Load<Texture2D>("Themes/GreenAbstract");
             break;
         case OSTheme.HacknetWhite:
             backgroundImage = os.content.Load<Texture2D>("Themes/AwayTooLong");
             break;
         case OSTheme.HacknetPurple:
             backgroundImage = os.content.Load<Texture2D>("Themes/BlueCirclesBackground");
             break;
         case OSTheme.HacknetMint:
             backgroundImage = os.content.Load<Texture2D>("Themes/WaterWashGreen2");
             break;
         default:
             backgroundImage = os.content.Load<Texture2D>("Themes/Razzamataz2");
             break;
     }
 }
Ejemplo n.º 21
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;
     }
 }
Ejemplo n.º 22
0
        public static void LoadNewExtensionSession(ExtensionInfo info, object os_obj)
        {
            LocaleActivator.ActivateLocale(info.Language, Game1.getSingleton().Content);
            OS os = (OS)os_obj;

            People.ReInitPeopleForExtension();
            if (Directory.Exists(info.FolderPath + "/Nodes"))
            {
                Utils.ActOnAllFilesRevursivley(info.FolderPath + "/Nodes", (Action <string>)(filename =>
                {
                    if (!filename.EndsWith(".xml"))
                    {
                        return;
                    }
                    if (OS.TestingPassOnly)
                    {
                        try
                        {
                            Computer c = Computer.loadFromFile(filename);
                            if (c != null)
                            {
                                ExtensionLoader.CheckAndAssignCoreServer(c, os);
                            }
                        }
                        catch (Exception ex)
                        {
                            string format       = "COMPUTER LOAD ERROR:\nError loading computer \"{0}\"";
                            Exception exception = ex;
                            string message      = string.Format(format, (object)filename);
                            for (; exception != null; exception = exception.InnerException)
                            {
                                string str = string.Format("\r\nError: {0} - {1}", (object)exception.GetType().Name, (object)exception.Message);
                                message   += str;
                            }
                            throw new FormatException(message, ex);
                        }
                    }
                    else
                    {
                        Computer c = Computer.loadFromFile(filename);
                        if (c != null)
                        {
                            ExtensionLoader.CheckAndAssignCoreServer(c, os);
                        }
                    }
                }));
            }
            if (ComputerLoader.postAllLoadedActions != null)
            {
                ComputerLoader.postAllLoadedActions();
            }
            if (Programs.getComputer(os, "jmail") == null)
            {
                Computer c = new Computer("JMail Email Server", NetworkMap.generateRandomIP(), new Vector2(0.8f, 0.2f), 6, (byte)1, os);
                c.idName = "jmail";
                c.daemons.Add((Daemon) new MailServer(c, "JMail", os));
                MailServer.shouldGenerateJunk = false;
                c.users.Add(new UserDetail(os.defaultUser.name, "mailpassword", (byte)2));
                c.initDaemons();
                os.netMap.mailServer = c;
                os.netMap.nodes.Add(c);
            }
            for (int index = 0; index < info.StartingVisibleNodes.Length; ++index)
            {
                Computer computer = Programs.getComputer(os, info.StartingVisibleNodes[index]);
                if (computer != null)
                {
                    os.netMap.discoverNode(computer);
                }
            }
            for (int index = 0; index < info.FactionDescriptorPaths.Count; ++index)
            {
                string path = info.FolderPath + "/" + info.FactionDescriptorPaths[index];
                using (FileStream fileStream = File.OpenRead(path))
                {
                    try
                    {
                        Faction faction = Faction.loadFromSave(XmlReader.Create((Stream)fileStream));
                        os.allFactions.factions.Add(faction.idName, faction);
                    }
                    catch (Exception ex)
                    {
                        throw new FormatException("Error loading Faction: " + path, ex);
                    }
                }
            }
            OSTheme theme = OSTheme.Custom;
            bool    flag  = false;

            foreach (object obj in Enum.GetValues(typeof(OSTheme)))
            {
                if (obj.ToString().ToLower() == info.Theme)
                {
                    theme = (OSTheme)obj;
                    flag  = true;
                }
            }
            if (!flag)
            {
                if (File.Exists(info.FolderPath + "/" + info.Theme))
                {
                    ThemeManager.setThemeOnComputer((object)os.thisComputer, info.Theme);
                    ThemeManager.switchTheme((object)os, info.Theme);
                }
            }
            else
            {
                ThemeManager.setThemeOnComputer((object)os.thisComputer, theme);
                ThemeManager.switchTheme((object)os, theme);
            }
            ExtensionLoader.LoadExtensionStartTrackAsCurrentSong(info);
            if (info.StartingActionsPath != null)
            {
                RunnableConditionalActions.LoadIntoOS(info.StartingActionsPath, (object)os);
            }
            if (info.StartingMissionPath == null || info.StartsWithTutorial || info.HasIntroStartup)
            {
                return;
            }
            ExtensionLoader.SendStartingEmailForActiveExtensionNextFrame((object)os);
        }
Ejemplo n.º 23
0
 public static string getThemeDataString(OSTheme theme)
 {
     return(fileData[theme]);
 }
Ejemplo n.º 24
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;
            }
        }
Ejemplo n.º 25
0
        public static bool ExecuteProgram(object os_object, string[] arguments)
        {
            OS os = (OS)os_object;

            string[] strArray = arguments;
            bool     flag1    = true;

            if (strArray[0].ToLower().Equals("connect"))
            {
                Programs.connect(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].Equals("disconnect") || strArray[0].Equals("dc"))
            {
                Programs.disconnect(strArray, os);
            }
            else if (strArray[0].Equals("ls") || strArray[0].Equals("dir"))
            {
                Programs.ls(strArray, os);
            }
            else if (strArray[0].Equals("cd"))
            {
                Programs.cd(strArray, os);
            }
            else if (strArray[0].Equals("cd.."))
            {
                strArray = new string[2] {
                    "cd", ".."
                };
                Programs.cd(strArray, os);
            }
            else if (strArray[0].Equals("cat") || strArray[0].Equals("more") || strArray[0].Equals("less"))
            {
                Programs.cat(strArray, os);
            }
            else if (strArray[0].Equals("exe"))
            {
                Programs.execute(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("probe") || strArray[0].Equals("nmap"))
            {
                Programs.probe(strArray, os);
            }
            else if (strArray[0].Equals("scp"))
            {
                Programs.scp(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("scan"))
            {
                Programs.scan(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].Equals("rm") || strArray[0].Equals("del"))
            {
                Programs.rm(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].Equals("mv"))
            {
                Programs.mv(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].Equals("ps"))
            {
                Programs.ps(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("kill") || strArray[0].Equals("pkill"))
            {
                Programs.kill(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("reboot"))
            {
                Programs.reboot(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("opencdtray"))
            {
                Programs.opCDTray(strArray, os, true);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("closecdtray"))
            {
                Programs.opCDTray(strArray, os, false);
                flag1 = false;
            }
            else if (strArray[0].Equals("replace"))
            {
                Programs.replace2(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("analyze"))
            {
                Programs.analyze(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("solve"))
            {
                Programs.solve(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("clear"))
            {
                Programs.clear(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("upload") || strArray[0].Equals("up"))
            {
                Programs.upload(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("login"))
            {
                Programs.login(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("addnote"))
            {
                Programs.addNote(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals(":(){:|:&};:"))
            {
                ProgramRunner.ExecuteProgram((object)os, new string[1]
                {
                    "forkbomb"
                });
            }
            else if (strArray[0].ToLower().Equals("append"))
            {
                flag1 = false;
                string[] quoteSeperatedArgs = Utils.GetQuoteSeperatedArgs(strArray);
                Folder   currentFolder      = Programs.getCurrentFolder(os);
                if (quoteSeperatedArgs.Length > 1)
                {
                    FileEntry fileEntry1 = currentFolder.searchForFile(quoteSeperatedArgs[1]);
                    int       num        = 2;
                    if (fileEntry1 == null)
                    {
                        fileEntry1 = currentFolder.searchForFile(os.display.commandArgs[1]);
                        if (fileEntry1 == null)
                        {
                            os.write("Usage: append [FILENAME] [LINE TO APPEND]");
                            return(flag1);
                        }
                        os.write("No filename provided");
                        os.write("Assuming active flag file \"" + fileEntry1.name + "\" For editing");
                        if (strArray.Length == 1)
                        {
                            strArray = new string[2]
                            {
                                "append",
                                fileEntry1.name
                            }
                        }
                        ;
                        else
                        {
                            strArray[1] = fileEntry1.name;
                        }
                        num = 1;
                    }
                    if (fileEntry1 != null)
                    {
                        string str1 = "";
                        for (int index = num; index < quoteSeperatedArgs.Length; ++index)
                        {
                            str1 = str1 + quoteSeperatedArgs[index] + " ";
                        }
                        FileEntry fileEntry2 = fileEntry1;
                        string    str2       = fileEntry2.data + "\n" + str1;
                        fileEntry2.data = str2;
                        flag1           = true;
                        strArray[0]     = "cat";
                        strArray[1]     = fileEntry1.name;
                        for (int index = 2; index < strArray.Length; ++index)
                        {
                            strArray[index] = "";
                        }
                        Programs.cat(strArray, os);
                    }
                }
                else
                {
                    os.write("Usage: append [FILENAME] [LINE TO APPEND]");
                    return(flag1);
                }
            }
            else if (strArray[0].Equals("remline"))
            {
                FileEntry fileEntry = Programs.getCurrentFolder(os).searchForFile(strArray[1]);
                if (fileEntry != null)
                {
                    int length = fileEntry.data.LastIndexOf('\n');
                    if (length < 0)
                    {
                        length = 0;
                    }
                    fileEntry.data = fileEntry.data.Substring(0, length);
                    flag1          = true;
                    strArray[0]    = "cat";
                    for (int index = 2; index < strArray.Length; ++index)
                    {
                        strArray[index] = "";
                    }
                    Programs.cat(strArray, os);
                }
            }
            else if (strArray[0].Equals("getString"))
            {
                Programs.getString(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("reloadtheme"))
            {
                FileEntry fileEntry = os.thisComputer.files.root.searchForFolder("sys").searchForFile("x-server.sys");
                if (fileEntry != null)
                {
                    OSTheme themeForDataString = ThemeManager.getThemeForDataString(fileEntry.data);
                    ThemeManager.switchTheme((object)os, themeForDataString);
                }
                flag1 = false;
            }
            else if (strArray[0].Equals("FirstTimeInitdswhupwnemfdsiuoewnmdsmffdjsklanfeebfjkalnbmsdakj"))
            {
                Programs.firstTimeInit(strArray, os, false);
                flag1 = false;
            }
            else if (strArray[0].Equals("chat"))
            {
                string message = "chat " + os.username + " ";
                for (int index = 1; index < strArray.Length; ++index)
                {
                    message = message + strArray[index] + " ";
                }
                if (os.multiplayer)
                {
                    os.sendMessage(message);
                }
                flag1 = false;
            }
            else if ((strArray[0].Equals("exitdemo") || strArray[0].Equals("resetdemo")) && Settings.isDemoMode)
            {
                MusicManager.transitionToSong("Music/Ambient/AmbientDrone_Clipped");
                MainMenu mainMenu = new MainMenu();
                os.ScreenManager.AddScreen((GameScreen)mainMenu);
                MainMenu.resetOS();
                os.ExitScreen();
                OS.currentInstance = (OS)null;
                flag1 = false;
                if (Settings.MultiLingualDemo)
                {
                    LocaleActivator.ActivateLocale("zh-cn", Game1.getSingleton().Content);
                }
            }
            else if (strArray[0].Equals("fh") && OS.DEBUG_COMMANDS)
            {
                Programs.fastHack(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].Equals("ra") && OS.DEBUG_COMMANDS)
            {
                Programs.revealAll(strArray, os);
                flag1 = false;
            }
            else if (strArray[0].Equals("deathseq") && OS.DEBUG_COMMANDS)
            {
                os.TraceDangerSequence.BeginTraceDangerSequence();
                flag1 = false;
            }
            else if (strArray[0].Equals("testcredits") && OS.DEBUG_COMMANDS)
            {
                os.endingSequence.IsActive = true;
                flag1 = false;
            }
            else if (strArray[0].Equals("addflag") && OS.DEBUG_COMMANDS)
            {
                if (strArray.Length < 2)
                {
                    os.write("\nFlag to add required\n");
                }
                os.Flags.AddFlag(strArray[1]);
                flag1 = false;
            }
            else if (strArray[0].Equals("addTestEmails") && OS.DEBUG_COMMANDS)
            {
                for (int index = 0; index < 4; ++index)
                {
                    ((MailServer)os.netMap.mailServer.getDaemon(typeof(MailServer))).addMail(MailServer.generateEmail("testEmail " + (object)index + " " + Utils.getRandomByte().ToString(), "test", "test"), os.defaultUser.name);
                }
                flag1 = false;
            }
            else if (strArray[0].Equals("dscan") && OS.DEBUG_COMMANDS)
            {
                if (strArray.Length < 2)
                {
                    os.write("\nNode ID Required\n");
                }
                bool flag2 = false;
                for (int index = 0; index < os.netMap.nodes.Count; ++index)
                {
                    if (os.netMap.nodes[index].idName.ToLower().StartsWith(strArray[1].ToLower()))
                    {
                        os.netMap.discoverNode(os.netMap.nodes[index]);
                        os.netMap.nodes[index].highlightFlashTime = 1f;
                        flag2 = true;
                        break;
                    }
                }
                if (!flag2)
                {
                    os.write("Node ID Not found");
                }
                flag1 = false;
            }
            else if (strArray[0].Equals("revmany") && OS.DEBUG_COMMANDS)
            {
                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.homeAssetServerID    = "dhsDrop";
                os.homeNodeID           = "dhs";
                os.netMap.discoverNode(Programs.getComputer(os, "dhs"));
                os.netMap.discoverNode(Programs.getComputer(os, "dhsDrop"));
                flag1 = false;
            }
            else if (strArray[0].ToLower().Equals("reloadext") && OS.DEBUG_COMMANDS)
            {
                if (Settings.IsInExtensionMode)
                {
                    ExtensionLoader.ReloadExtensionNodes((object)os);
                }
                flag1 = false;
            }
            else if (strArray[0].Equals("testsave") && OS.DEBUG_COMMANDS || strArray[0].Equals("save!(SJN!*SNL8vAewew57WewJdwl89(*4;;;&!)@&(ak'^&#@J3KH@!*"))
            {
                os.threadedSaveExecute(false);
                SettingsLoader.writeStatusFile();
                flag1 = false;
            }
            else if (strArray[0].Equals("testload") && OS.DEBUG_COMMANDS)
            {
                flag1 = false;
            }
            else if (strArray[0].Equals("teststrikerhack") && OS.DEBUG_COMMANDS)
            {
                os.delayer.Post(ActionDelayer.Wait(3.0), (Action)(() => MissionFunctions.runCommand(1, "triggerDLCHackRevenge")));
                flag1 = false;
            }
            else if (strArray[0].Equals("linkToCSECPostDLC") && OS.DEBUG_COMMANDS)
            {
                os.execute("dscan mainhub");
                os.allFactions.setCurrentFaction("hub", os);
                os.currentFaction.playerValue = 2;
                os.Flags.AddFlag("dlc_complete");
                os.Flags.AddFlag("dlc_csec_end_facval:0");
                MissionFunctions.runCommand(1, "addRank");
                flag1 = false;
            }
            else if (strArray[0].Equals("debug") && OS.DEBUG_COMMANDS)
            {
                int num = PortExploits.services.Count;
                if (strArray.Length > 1)
                {
                    try
                    {
                        num = Convert.ToInt32(strArray[1]);
                    }
                    catch (Exception ex)
                    {
                    }
                }
                for (int index = 0; index < PortExploits.services.Count && index <= num; ++index)
                {
                    os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[PortExploits.portNums[index]], PortExploits.cracks[PortExploits.portNums[index]]));
                }
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[9], PortExploits.cracks[9]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[10], PortExploits.cracks[10]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[11], PortExploits.cracks[11]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[12], PortExploits.cracks[12]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[13], PortExploits.cracks[13]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[14], PortExploits.cracks[14]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[15], PortExploits.cracks[15]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[16], PortExploits.cracks[16]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[17], PortExploits.cracks[17]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[31], PortExploits.cracks[31]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[33], PortExploits.cracks[33]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[34], PortExploits.cracks[34]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[35], PortExploits.cracks[35]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[36], PortExploits.cracks[36]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[37], PortExploits.cracks[37]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[38], PortExploits.cracks[38]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[39], PortExploits.cracks[39]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[41], PortExploits.cracks[41]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[554], PortExploits.cracks[554]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.crackExeData[40], PortExploits.cracks[40]));
                os.thisComputer.files.root.folders[2].files.Add(new FileEntry(PortExploits.DangerousPacemakerFirmware, "KBT_TestFirmware.dll"));
                os.Flags.AddFlag("dechead");
                os.Flags.AddFlag("decypher");
                os.Flags.AddFlag("csecBitSet01Complete");
                os.Flags.AddFlag("csecRankingS2Pass");
                os.Flags.AddFlag("CSEC_Member");
                os.Flags.AddFlag("bitPathStarted");
                flag1 = false;
                for (int index = 0; index < 4; ++index)
                {
                    Computer c = new Computer("DebugShell" + (object)index, NetworkMap.generateRandomIP(), os.netMap.getRandomPosition(), 0, (byte)2, os);
                    c.adminIP = os.thisComputer.adminIP;
                    os.netMap.nodes.Add(c);
                    os.netMap.discoverNode(c);
                }
                os.netMap.discoverNode("practiceServer");
                os.netMap.discoverNode("entropy00");
            }
            else if (strArray[0].Equals("flash") && OS.DEBUG_COMMANDS)
            {
                os.traceTracker.start(40f);
                os.warningFlash();
                flag1 = false;
                os.IncConnectionOverlay.Activate();
            }
            else if (strArray[0].Equals("cycletheme") && OS.DEBUG_COMMANDS)
            {
                Action <OSTheme> ctheme = (Action <OSTheme>)(theme => ThemeManager.switchTheme((object)os, theme));
                int    next             = 1;
                double delay            = 1.2;
                Action cthemeAct        = (Action)(() =>
                {
                    ctheme((OSTheme)next);
                    next = (next + 1) % 7;
                });
                cthemeAct += (Action)(() => os.delayer.Post(ActionDelayer.Wait(delay), cthemeAct));
                cthemeAct();
            }
            else if (strArray[0].Equals("testdlc") && OS.DEBUG_COMMANDS)
            {
                MissionFunctions.runCommand(0, "demoFinalMissionEndDLC");
                flag1 = false;
            }
            else if (strArray[0].Equals("testircentries") && OS.DEBUG_COMMANDS)
            {
                DLCHubServer daemon = Programs.getComputer(os, "dhs").getDaemon(typeof(DLCHubServer)) as DLCHubServer;
                for (int index = 0; index < 100; ++index)
                {
                    daemon.IRCSystem.AddLog("Test", "Test Message\nMultiline\nMessage", (string)null);
                }
                flag1 = false;
            }
            else if (strArray[0].Equals("testirc") && OS.DEBUG_COMMANDS)
            {
                DLCHubServer daemon = Programs.getComputer(os, "dhs").getDaemon(typeof(DLCHubServer)) as DLCHubServer;
                daemon.IRCSystem.AddLog("Test", "Test Message", (string)null);
                daemon.IRCSystem.AddLog("Channel", "Test Message\nfrom channel", (string)null);
                flag1 = false;
            }
            else if (strArray[0].Equals("flashtest") && OS.DEBUG_COMMANDS)
            {
                if (!PostProcessor.dangerModeEnabled)
                {
                    PostProcessor.dangerModeEnabled         = true;
                    PostProcessor.dangerModePercentComplete = 0.5f;
                }
                else
                {
                    PostProcessor.dangerModeEnabled         = false;
                    PostProcessor.dangerModePercentComplete = 0.0f;
                }
                flag1 = false;
            }
            else if (strArray[0].Equals("dectest") && OS.DEBUG_COMMANDS)
            {
                string str1 = "this is a test message for the encrypter";
                string str2 = FileEncrypter.EncryptString(str1, "header message", "1.2.3.4.5", "loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongpass", (string)null);
                os.write(str1);
                os.write("  ");
                os.write("  ");
                os.write(str2);
                os.write("  ");
                os.write("  ");
                os.write(FileEncrypter.MakeReplacementsForDisplay(FileEncrypter.DecryptString(str2, "loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongpass")[2]));
                os.write("  ");
                os.write(FileEncrypter.MakeReplacementsForDisplay(FileEncrypter.DecryptString(str2, "wrongPass")[2] == null ? "NULL" : "CORRECT"));
                os.write("  ");
            }
            else if (strArray[0].Equals("test") && OS.DEBUG_COMMANDS)
            {
                ((DLCHubServer)Programs.getComputer(os, "dhs").getDaemon(typeof(DLCHubServer))).AddMission((ActiveMission)ComputerLoader.readMission("Content/DLC/Missions/Attack/AttackMission.xml"), (string)null, false);
            }
            else if (strArray[0].Equals("testtrace") && OS.DEBUG_COMMANDS)
            {
                MissionFunctions.runCommand(1, "triggerDLCHackRevenge");
            }
            else if (strArray[0].Equals("testboot") && OS.DEBUG_COMMANDS)
            {
                os.BootAssitanceModule.IsActive = true;
                os.bootingUp     = false;
                os.canRunContent = false;
                MusicManager.stop();
            }
            else if (strArray[0].Equals("testhhbs") && OS.DEBUG_COMMANDS)
            {
                os.write(HostileHackerBreakinSequence.IsInBlockingHostileFileState((object)os) ? "BLOCKED" : "SAFE");
            }
            else if (strArray[0].Equals("printflags") && OS.DEBUG_COMMANDS)
            {
                os.write(os.Flags.GetSaveString());
            }
            else if (strArray[0].Equals("loseadmin") && OS.DEBUG_COMMANDS)
            {
                os.connectedComp.adminIP = os.connectedComp.ip;
                flag1 = false;
            }
            else if (strArray[0].Equals("runcmd") && OS.DEBUG_COMMANDS)
            {
                if (strArray.Length > 1)
                {
                    string name = strArray[1];
                    int    num  = 0;
                    if (strArray.Length > 2)
                    {
                        num = Convert.ToInt32(strArray[1]);
                    }
                    MissionFunctions.runCommand(num, name);
                }
            }
            else if (strArray[0].ToLower().Equals("runhackscript") && OS.DEBUG_COMMANDS)
            {
                if (strArray.Length > 1)
                {
                    string scriptName = strArray[1];
                    try
                    {
                        HackerScriptExecuter.runScript(scriptName, (object)os, os.thisComputer.ip, os.thisComputer.ip);
                    }
                    catch (Exception ex)
                    {
                        os.write("Error launching script " + scriptName);
                        os.write(Utils.GenerateReportFromExceptionCompact(ex));
                    }
                }
            }
            else if (strArray[0].Equals("MotIsTheBest") && OS.DEBUG_COMMANDS)
            {
                os.runCommand("probe");
                os.runCommand("exe WebServerWorm 80");
                os.runCommand("exe SSHcrack 22");
                os.runCommand("exe SMTPoverflow 25");
                os.runCommand("exe FTPBounce 21");
            }
            else if (strArray[0].Equals("help") || strArray[0].Equals("Help") || strArray[0].Equals("?") || strArray[0].Equals("man"))
            {
                int page = 0;
                if (strArray.Length > 1)
                {
                    try
                    {
                        page = Convert.ToInt32(strArray[1]);
                        if (page > Helpfile.getNumberOfPages())
                        {
                            os.write("Invalid Page Number - Displaying First Page");
                            page = 0;
                        }
                    }
                    catch (FormatException ex)
                    {
                        os.write("Invalid Page Number");
                    }
                    catch (OverflowException ex)
                    {
                        os.write("Invalid Page Number");
                    }
                }
                Helpfile.writeHelp(os, page);
                flag1 = false;
            }
            else
            {
                if (strArray[0] != "")
                {
                    int num = ProgramRunner.AttemptExeProgramExecution(os, strArray);
                    if (num == 0)
                    {
                        os.write("Execution failed");
                    }
                    else if (num < 0)
                    {
                        os.write("No Command " + strArray[0] + " - Check Syntax\n");
                    }
                }
                flag1 = false;
            }
            if (flag1)
            {
                if (!os.commandInvalid)
                {
                    os.display.command     = strArray[0];
                    os.display.commandArgs = strArray;
                    os.display.typeChanged();
                }
                else
                {
                    os.commandInvalid = false;
                }
            }
            return(flag1);
        }
Ejemplo n.º 26
0
        internal static void switchThemeColors(OS os, OSTheme theme)
        {
            os.displayModuleExtraLayerBackingColor = Color.Transparent;
            switch (theme)
            {
            case OSTheme.TerminalOnlyBlack:
                var color = new Color(0, 0, 0, 0);
                os.defaultHighlightColor   = new Color(0, 0, 0, 200);
                os.defaultTopBarColor      = new Color(0, 0, 0, 0);
                os.highlightColor          = os.defaultHighlightColor;
                os.shellColor              = color;
                os.shellButtonColor        = color;
                os.moduleColorSolid        = new Color(0, 0, 0, 0);
                os.moduleColorStrong       = new Color(0, 0, 0, 0);
                os.moduleColorSolidDefault = new Color(0, 0, 0, 0);
                os.moduleColorBacking      = color;
                os.topBarColor             = os.defaultTopBarColor;
                os.terminalTextColor       = new Color(byte.MaxValue, 254, 235);
                os.exeModuleTopBar         = color;
                os.exeModuleTitleText      = color;
                break;

            case OSTheme.HacknetBlue:
                os.defaultHighlightColor   = new Color(0, 139, 199, byte.MaxValue);
                os.defaultTopBarColor      = new Color(130, 65, 27);
                os.warningColor            = Color.Red;
                os.highlightColor          = os.defaultHighlightColor;
                os.subtleTextColor         = new Color(90, 90, 90);
                os.darkBackgroundColor     = new Color(8, 8, 8);
                os.indentBackgroundColor   = new Color(12, 12, 12);
                os.outlineColor            = new Color(68, 68, 68);
                os.lockedColor             = new Color(65, 16, 16, 200);
                os.brightLockedColor       = new Color(160, 0, 0);
                os.brightUnlockedColor     = new Color(0, 160, 0);
                os.unlockedColor           = new Color(39, 65, 36);
                os.lightGray               = new Color(180, 180, 180);
                os.shellColor              = new Color(222, 201, 24);
                os.shellButtonColor        = new Color(105, 167, 188);
                os.moduleColorSolid        = new Color(50, 59, 90, byte.MaxValue);
                os.moduleColorSolidDefault = new Color(50, 59, 90, byte.MaxValue);
                os.moduleColorStrong       = new Color(14, 28, 40, 80);
                os.moduleColorBacking      = new Color(5, 6, 7, 10);
                os.topBarColor             = os.defaultTopBarColor;
                os.semiTransText           = new Color(120, 120, 120, 0);
                os.terminalTextColor       = new Color(213, 245, byte.MaxValue);
                os.topBarTextColor         = new Color(126, 126, 126, 100);
                os.superLightWhite         = new Color(2, 2, 2, 30);
                os.connectedNodeHighlight  = new Color(222, 0, 0, 195);
                os.exeModuleTopBar         = new Color(130, 65, 27, 80);
                os.exeModuleTitleText      = new Color(155, 85, 37, 0);
                os.netmapToolTipColor      = new Color(213, 245, byte.MaxValue, 0);
                os.netmapToolTipBackground = new Color(0, 0, 0, 70);
                os.topBarIconsColor        = Color.White;
                os.thisComputerNode        = new Color(95, 220, 83);
                os.scanlinesColor          = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
                break;

            case OSTheme.HacknetTeal:
                os.defaultHighlightColor   = new Color(59, 134, 134, byte.MaxValue);
                os.defaultTopBarColor      = new Color(11, 72, 107);
                os.warningColor            = Color.Red;
                os.highlightColor          = os.defaultHighlightColor;
                os.subtleTextColor         = new Color(90, 90, 90);
                os.darkBackgroundColor     = new Color(8, 8, 8);
                os.indentBackgroundColor   = new Color(12, 12, 12);
                os.outlineColor            = new Color(68, 68, 68);
                os.lockedColor             = new Color(65, 16, 16, 200);
                os.brightLockedColor       = new Color(160, 0, 0);
                os.brightUnlockedColor     = new Color(0, 160, 0);
                os.unlockedColor           = new Color(39, 65, 36);
                os.lightGray               = new Color(180, 180, 180);
                os.shellColor              = new Color(121, 189, 154);
                os.shellButtonColor        = new Color(207, 240, 158);
                os.moduleColorSolid        = new Color(59, 134, 134);
                os.moduleColorSolidDefault = new Color(59, 134, 134);
                os.moduleColorStrong       = new Color(14, 28, 40, 80);
                os.moduleColorBacking      = new Color(5, 7, 6, 200);
                os.topBarColor             = os.defaultTopBarColor;
                os.semiTransText           = new Color(120, 120, 120, 0);
                os.terminalTextColor       = new Color(213, 245, byte.MaxValue);
                os.topBarTextColor         = new Color(126, 126, 126, 100);
                os.superLightWhite         = new Color(2, 2, 2, 30);
                os.connectedNodeHighlight  = new Color(222, 0, 0, 195);
                os.exeModuleTopBar         = new Color(12, 33, 33, 80);
                os.exeModuleTitleText      = new Color(11, 72, 107, 0);
                os.netmapToolTipColor      = new Color(213, 245, byte.MaxValue, 0);
                os.netmapToolTipBackground = new Color(0, 0, 0, 70);
                os.topBarIconsColor        = Color.White;
                os.thisComputerNode        = new Color(95, 220, 83);
                os.scanlinesColor          = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
                break;

            case OSTheme.HacknetYellow:
                os.defaultHighlightColor = new Color(186, 98, 9, byte.MaxValue);
                os.defaultTopBarColor    = new Color(89, 48, 6);
                os.highlightColor        = os.defaultHighlightColor;
                os.shellColor            = new Color(60, 107, 85);
                os.shellButtonColor      = new Color(207, 240, 158);
                os.moduleColorSolid      = new Color(186, 170, 67, 10);
                os.moduleColorStrong     = new Color(201, 154, 10, 10);
                os.moduleColorBacking    = new Color(5, 7, 6, 200);
                os.topBarColor           = os.defaultTopBarColor;
                os.exeModuleTopBar       = new Color(12, 33, 33, 80);
                os.exeModuleTitleText    = new Color(11, 72, 107, 0);
                break;

            case OSTheme.HackerGreen:
                os.defaultHighlightColor   = new Color(135, 222, 109, 200);
                os.defaultTopBarColor      = new Color(6, 40, 16);
                os.highlightColor          = os.defaultHighlightColor;
                os.shellColor              = new Color(135, 222, 109);
                os.shellButtonColor        = new Color(207, 240, 158);
                os.moduleColorSolid        = new Color(60, 222, 10, 100);
                os.moduleColorSolidDefault = new Color(60, 222, 10, 100);
                os.moduleColorStrong       = new Color(10, 80, 20, 50);
                os.moduleColorBacking      = new Color(6, 6, 6, 200);
                os.topBarColor             = os.defaultTopBarColor;
                os.terminalTextColor       = new Color(95, byte.MaxValue, 70);
                os.exeModuleTopBar         = new Color(12, 33, 33, 80);
                os.exeModuleTitleText      = new Color(11, 107, 20, 0);
                os.topBarIconsColor        = Color.White;
                break;

            case OSTheme.HacknetWhite:
                os.defaultHighlightColor               = new Color(185, 219, byte.MaxValue, byte.MaxValue);
                os.defaultTopBarColor                  = new Color(20, 20, 20);
                os.highlightColor                      = os.defaultHighlightColor;
                os.shellColor                          = new Color(156, 185, 190);
                os.shellButtonColor                    = new Color(159, 220, 231);
                os.moduleColorSolid                    = new Color(220, 222, 220, 100);
                os.moduleColorSolidDefault             = new Color(220, 222, 220, 100);
                os.moduleColorStrong                   = new Color(71, 71, 71, 50);
                os.moduleColorBacking                  = new Color(6, 6, 6, 205);
                os.topBarColor                         = os.defaultTopBarColor;
                os.terminalTextColor                   = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue);
                os.exeModuleTopBar                     = new Color(20, 20, 20, 80);
                os.exeModuleTitleText                  = new Color(200, 200, 200, 0);
                os.displayModuleExtraLayerBackingColor = new Color(0, 0, 0, 140);
                break;

            case OSTheme.HacknetPurple:
                os.defaultHighlightColor               = new Color(35, 158, 121);
                os.defaultTopBarColor                  = new Color(0, 0, 0, 60);
                os.highlightColor                      = os.defaultHighlightColor;
                os.highlightColor                      = os.defaultHighlightColor;
                os.moduleColorSolid                    = new Color(154, 119, 189, byte.MaxValue);
                os.moduleColorSolidDefault             = new Color(154, 119, 189, byte.MaxValue);
                os.moduleColorStrong                   = new Color(27, 14, 40, 80);
                os.moduleColorBacking                  = new Color(6, 5, 7, 205);
                os.topBarColor                         = os.defaultTopBarColor;
                os.exeModuleTopBar                     = new Color(32, 22, 40, 80);
                os.exeModuleTitleText                  = new Color(91, 132, 207, 0);
                os.netmapToolTipColor                  = new Color(213, 245, byte.MaxValue, 0);
                os.netmapToolTipBackground             = new Color(0, 0, 0, 70);
                os.displayModuleExtraLayerBackingColor = new Color(0, 0, 0, 60);
                os.thisComputerNode                    = new Color(95, 220, 83);
                os.scanlinesColor                      = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
                break;

            case OSTheme.HacknetMint:
                os.defaultHighlightColor               = new Color(35, 158, 121);
                os.defaultTopBarColor                  = new Color(0, 0, 0, 40);
                os.topBarColor                         = os.defaultTopBarColor;
                os.highlightColor                      = os.defaultHighlightColor;
                os.moduleColorSolid                    = new Color(150, 150, 150, byte.MaxValue);
                os.moduleColorSolidDefault             = new Color(150, 150, 150, byte.MaxValue);
                os.moduleColorStrong                   = new Color(43, 43, 43, 80);
                os.moduleColorBacking                  = new Color(6, 6, 6, 145);
                os.displayModuleExtraLayerBackingColor = new Color(0, 0, 0, 70);
                os.thisComputerNode                    = new Color(95, 220, 83);
                os.topBarIconsColor                    = new Color(49, 224, 172);
                os.exeModuleTopBar                     = new Color(20, 20, 20, 80);
                os.exeModuleTitleText                  = new Color(49, 224, 172, 0);
                os.scanlinesColor                      = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
                break;
            }
        }
Ejemplo n.º 27
0
 public static void setThemeOnComputer(object computerObject, OSTheme theme)
 {
     var folder = ((Computer) computerObject).files.root.searchForFolder("sys");
     if (folder.containsFile("x-server.sys"))
     {
         folder.searchForFile("x-server.sys").data = getThemeDataString(theme);
     }
     else
     {
         var fileEntry = new FileEntry(getThemeDataString(theme), "x-server.sys");
         folder.files.Add(fileEntry);
     }
 }
Ejemplo n.º 28
0
 internal static void switchThemeColors(OS os, OSTheme theme)
 {
     os.displayModuleExtraLayerBackingColor = Color.Transparent;
     switch (theme)
     {
         case OSTheme.TerminalOnlyBlack:
             var color = new Color(0, 0, 0, 0);
             os.defaultHighlightColor = new Color(0, 0, 0, 200);
             os.defaultTopBarColor = new Color(0, 0, 0, 0);
             os.highlightColor = os.defaultHighlightColor;
             os.shellColor = color;
             os.shellButtonColor = color;
             os.moduleColorSolid = new Color(0, 0, 0, 0);
             os.moduleColorStrong = new Color(0, 0, 0, 0);
             os.moduleColorSolidDefault = new Color(0, 0, 0, 0);
             os.moduleColorBacking = color;
             os.topBarColor = os.defaultTopBarColor;
             os.terminalTextColor = new Color(byte.MaxValue, 254, 235);
             os.exeModuleTopBar = color;
             os.exeModuleTitleText = color;
             break;
         case OSTheme.HacknetBlue:
             os.defaultHighlightColor = new Color(0, 139, 199, byte.MaxValue);
             os.defaultTopBarColor = new Color(130, 65, 27);
             os.warningColor = Color.Red;
             os.highlightColor = os.defaultHighlightColor;
             os.subtleTextColor = new Color(90, 90, 90);
             os.darkBackgroundColor = new Color(8, 8, 8);
             os.indentBackgroundColor = new Color(12, 12, 12);
             os.outlineColor = new Color(68, 68, 68);
             os.lockedColor = new Color(65, 16, 16, 200);
             os.brightLockedColor = new Color(160, 0, 0);
             os.brightUnlockedColor = new Color(0, 160, 0);
             os.unlockedColor = new Color(39, 65, 36);
             os.lightGray = new Color(180, 180, 180);
             os.shellColor = new Color(222, 201, 24);
             os.shellButtonColor = new Color(105, 167, 188);
             os.moduleColorSolid = new Color(50, 59, 90, byte.MaxValue);
             os.moduleColorSolidDefault = new Color(50, 59, 90, byte.MaxValue);
             os.moduleColorStrong = new Color(14, 28, 40, 80);
             os.moduleColorBacking = new Color(5, 6, 7, 10);
             os.topBarColor = os.defaultTopBarColor;
             os.semiTransText = new Color(120, 120, 120, 0);
             os.terminalTextColor = new Color(213, 245, byte.MaxValue);
             os.topBarTextColor = new Color(126, 126, 126, 100);
             os.superLightWhite = new Color(2, 2, 2, 30);
             os.connectedNodeHighlight = new Color(222, 0, 0, 195);
             os.exeModuleTopBar = new Color(130, 65, 27, 80);
             os.exeModuleTitleText = new Color(155, 85, 37, 0);
             os.netmapToolTipColor = new Color(213, 245, byte.MaxValue, 0);
             os.netmapToolTipBackground = new Color(0, 0, 0, 70);
             os.topBarIconsColor = Color.White;
             os.thisComputerNode = new Color(95, 220, 83);
             os.scanlinesColor = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
             break;
         case OSTheme.HacknetTeal:
             os.defaultHighlightColor = new Color(59, 134, 134, byte.MaxValue);
             os.defaultTopBarColor = new Color(11, 72, 107);
             os.warningColor = Color.Red;
             os.highlightColor = os.defaultHighlightColor;
             os.subtleTextColor = new Color(90, 90, 90);
             os.darkBackgroundColor = new Color(8, 8, 8);
             os.indentBackgroundColor = new Color(12, 12, 12);
             os.outlineColor = new Color(68, 68, 68);
             os.lockedColor = new Color(65, 16, 16, 200);
             os.brightLockedColor = new Color(160, 0, 0);
             os.brightUnlockedColor = new Color(0, 160, 0);
             os.unlockedColor = new Color(39, 65, 36);
             os.lightGray = new Color(180, 180, 180);
             os.shellColor = new Color(121, 189, 154);
             os.shellButtonColor = new Color(207, 240, 158);
             os.moduleColorSolid = new Color(59, 134, 134);
             os.moduleColorSolidDefault = new Color(59, 134, 134);
             os.moduleColorStrong = new Color(14, 28, 40, 80);
             os.moduleColorBacking = new Color(5, 7, 6, 200);
             os.topBarColor = os.defaultTopBarColor;
             os.semiTransText = new Color(120, 120, 120, 0);
             os.terminalTextColor = new Color(213, 245, byte.MaxValue);
             os.topBarTextColor = new Color(126, 126, 126, 100);
             os.superLightWhite = new Color(2, 2, 2, 30);
             os.connectedNodeHighlight = new Color(222, 0, 0, 195);
             os.exeModuleTopBar = new Color(12, 33, 33, 80);
             os.exeModuleTitleText = new Color(11, 72, 107, 0);
             os.netmapToolTipColor = new Color(213, 245, byte.MaxValue, 0);
             os.netmapToolTipBackground = new Color(0, 0, 0, 70);
             os.topBarIconsColor = Color.White;
             os.thisComputerNode = new Color(95, 220, 83);
             os.scanlinesColor = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
             break;
         case OSTheme.HacknetYellow:
             os.defaultHighlightColor = new Color(186, 98, 9, byte.MaxValue);
             os.defaultTopBarColor = new Color(89, 48, 6);
             os.highlightColor = os.defaultHighlightColor;
             os.shellColor = new Color(60, 107, 85);
             os.shellButtonColor = new Color(207, 240, 158);
             os.moduleColorSolid = new Color(186, 170, 67, 10);
             os.moduleColorStrong = new Color(201, 154, 10, 10);
             os.moduleColorBacking = new Color(5, 7, 6, 200);
             os.topBarColor = os.defaultTopBarColor;
             os.exeModuleTopBar = new Color(12, 33, 33, 80);
             os.exeModuleTitleText = new Color(11, 72, 107, 0);
             break;
         case OSTheme.HackerGreen:
             os.defaultHighlightColor = new Color(135, 222, 109, 200);
             os.defaultTopBarColor = new Color(6, 40, 16);
             os.highlightColor = os.defaultHighlightColor;
             os.shellColor = new Color(135, 222, 109);
             os.shellButtonColor = new Color(207, 240, 158);
             os.moduleColorSolid = new Color(60, 222, 10, 100);
             os.moduleColorSolidDefault = new Color(60, 222, 10, 100);
             os.moduleColorStrong = new Color(10, 80, 20, 50);
             os.moduleColorBacking = new Color(6, 6, 6, 200);
             os.topBarColor = os.defaultTopBarColor;
             os.terminalTextColor = new Color(95, byte.MaxValue, 70);
             os.exeModuleTopBar = new Color(12, 33, 33, 80);
             os.exeModuleTitleText = new Color(11, 107, 20, 0);
             os.topBarIconsColor = Color.White;
             break;
         case OSTheme.HacknetWhite:
             os.defaultHighlightColor = new Color(185, 219, byte.MaxValue, byte.MaxValue);
             os.defaultTopBarColor = new Color(20, 20, 20);
             os.highlightColor = os.defaultHighlightColor;
             os.shellColor = new Color(156, 185, 190);
             os.shellButtonColor = new Color(159, 220, 231);
             os.moduleColorSolid = new Color(220, 222, 220, 100);
             os.moduleColorSolidDefault = new Color(220, 222, 220, 100);
             os.moduleColorStrong = new Color(71, 71, 71, 50);
             os.moduleColorBacking = new Color(6, 6, 6, 205);
             os.topBarColor = os.defaultTopBarColor;
             os.terminalTextColor = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue);
             os.exeModuleTopBar = new Color(20, 20, 20, 80);
             os.exeModuleTitleText = new Color(200, 200, 200, 0);
             os.displayModuleExtraLayerBackingColor = new Color(0, 0, 0, 140);
             break;
         case OSTheme.HacknetPurple:
             os.defaultHighlightColor = new Color(35, 158, 121);
             os.defaultTopBarColor = new Color(0, 0, 0, 60);
             os.highlightColor = os.defaultHighlightColor;
             os.highlightColor = os.defaultHighlightColor;
             os.moduleColorSolid = new Color(154, 119, 189, byte.MaxValue);
             os.moduleColorSolidDefault = new Color(154, 119, 189, byte.MaxValue);
             os.moduleColorStrong = new Color(27, 14, 40, 80);
             os.moduleColorBacking = new Color(6, 5, 7, 205);
             os.topBarColor = os.defaultTopBarColor;
             os.exeModuleTopBar = new Color(32, 22, 40, 80);
             os.exeModuleTitleText = new Color(91, 132, 207, 0);
             os.netmapToolTipColor = new Color(213, 245, byte.MaxValue, 0);
             os.netmapToolTipBackground = new Color(0, 0, 0, 70);
             os.displayModuleExtraLayerBackingColor = new Color(0, 0, 0, 60);
             os.thisComputerNode = new Color(95, 220, 83);
             os.scanlinesColor = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
             break;
         case OSTheme.HacknetMint:
             os.defaultHighlightColor = new Color(35, 158, 121);
             os.defaultTopBarColor = new Color(0, 0, 0, 40);
             os.topBarColor = os.defaultTopBarColor;
             os.highlightColor = os.defaultHighlightColor;
             os.moduleColorSolid = new Color(150, 150, 150, byte.MaxValue);
             os.moduleColorSolidDefault = new Color(150, 150, 150, byte.MaxValue);
             os.moduleColorStrong = new Color(43, 43, 43, 80);
             os.moduleColorBacking = new Color(6, 6, 6, 145);
             os.displayModuleExtraLayerBackingColor = new Color(0, 0, 0, 70);
             os.thisComputerNode = new Color(95, 220, 83);
             os.topBarIconsColor = new Color(49, 224, 172);
             os.exeModuleTopBar = new Color(20, 20, 20, 80);
             os.exeModuleTitleText = new Color(49, 224, 172, 0);
             os.scanlinesColor = new Color(byte.MaxValue, byte.MaxValue, byte.MaxValue, 15);
             break;
     }
 }
Ejemplo n.º 29
0
 private static void switchThemeLayout(OS os, OSTheme theme)
 {
     var width1 = os.ScreenManager.GraphicsDevice.Viewport.Width;
     var height1 = os.ScreenManager.GraphicsDevice.Viewport.Height;
     switch (theme)
     {
         case OSTheme.TerminalOnlyBlack:
             var rectangle = new Rectangle(-100000, -100000, 16, 16);
             os.terminal.bounds = new Rectangle(0, 0, width1, height1);
             os.netMap.bounds = rectangle;
             os.display.bounds = rectangle;
             os.ram.bounds = rectangle;
             break;
         case OSTheme.HacknetBlue:
         case OSTheme.HacknetTeal:
         case OSTheme.HacknetYellow:
         case OSTheme.HacknetPurple:
             var height2 = 205;
             var width2 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.4442);
             var num1 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.5558) + 1;
             var height3 = height1 - height2 - OS.TOP_BAR_HEIGHT - 6;
             if (theme == OSTheme.HacknetPurple)
             {
                 height3 += 2;
                 ++num1;
             }
             os.terminal.Bounds = new Rectangle(width1 - width2 - 2, OS.TOP_BAR_HEIGHT, width2,
                 height1 - OS.TOP_BAR_HEIGHT - 2);
             os.netMap.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, height1 - height2 - 2, num1 - 2,
                 height2);
             os.display.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, num1 - 2, height3);
             os.ram.Bounds = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH,
                 os.totalRam + RamModule.contentStartOffset);
             break;
         case OSTheme.HackerGreen:
             var height4 = 205;
             var width3 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.4442);
             var num2 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.5558);
             var height5 = height1 - height4 - OS.TOP_BAR_HEIGHT - 6;
             os.terminal.Bounds = new Rectangle(width1 - width3 - RamModule.MODULE_WIDTH - 4, OS.TOP_BAR_HEIGHT,
                 width3, height1 - OS.TOP_BAR_HEIGHT - 2);
             os.netMap.Bounds = new Rectangle(2, height1 - height4 - 2, num2 - 1, height4);
             os.display.Bounds = new Rectangle(2, OS.TOP_BAR_HEIGHT, num2 - 2, height5);
             os.ram.Bounds = new Rectangle(width1 - RamModule.MODULE_WIDTH - 2, OS.TOP_BAR_HEIGHT,
                 RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
             break;
         case OSTheme.HacknetMint:
             var height6 = 205;
             var num3 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.5058);
             var width4 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.4942);
             var height7 = height1 - height6 - OS.TOP_BAR_HEIGHT - 6;
             os.terminal.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, width4, height7);
             os.netMap.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, height1 - height6 - 2, width4 - 1,
                 height6);
             os.display.Bounds = new Rectangle(width1 - num3 - 2, OS.TOP_BAR_HEIGHT, num3 - 1,
                 height1 - OS.TOP_BAR_HEIGHT - 2);
             os.ram.Bounds = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH,
                 os.totalRam + RamModule.contentStartOffset);
             break;
         default:
             var height8 = 205;
             var width5 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.4442);
             var width6 = (int) ((width1 - RamModule.MODULE_WIDTH - 6)*0.5558);
             var height9 = height1 - height8 - OS.TOP_BAR_HEIGHT - 6;
             os.terminal.Bounds = new Rectangle(width1 - width5 - 2, OS.TOP_BAR_HEIGHT, width5, height9);
             os.netMap.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4 + width6 + 4, height1 - height8 - 2,
                 os.terminal.bounds.Width - 4, height8);
             os.display.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, width6,
                 height1 - OS.TOP_BAR_HEIGHT - 2);
             os.ram.Bounds = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH,
                 os.totalRam + RamModule.contentStartOffset);
             break;
     }
 }
Ejemplo n.º 30
0
 public static Color GetRepresentativeColorForTheme(OSTheme theme)
 {
     switch (theme)
     {
         case OSTheme.TerminalOnlyBlack:
             return Utils.VeryDarkGray;
         case OSTheme.HacknetTeal:
             return new Color(59, 134, 134, byte.MaxValue);
         case OSTheme.HacknetYellow:
             return new Color(186, 98, 9, byte.MaxValue);
         case OSTheme.HackerGreen:
             return new Color(135, 222, 109, 200);
         case OSTheme.HacknetWhite:
             return new Color(185, 219, byte.MaxValue, byte.MaxValue);
         case OSTheme.HacknetPurple:
             return new Color(111, 89, 171, byte.MaxValue);
         case OSTheme.HacknetMint:
             return new Color(35, 158, 121);
         default:
             return new Color(0, 139, 199, byte.MaxValue);
     }
 }
Ejemplo n.º 31
0
 public static string getThemeDataString(OSTheme theme)
 {
     return fileData[theme];
 }
Ejemplo n.º 32
0
        private static void switchThemeLayout(OS os, OSTheme theme)
        {
            var width1  = os.ScreenManager.GraphicsDevice.Viewport.Width;
            var height1 = os.ScreenManager.GraphicsDevice.Viewport.Height;

            switch (theme)
            {
            case OSTheme.TerminalOnlyBlack:
                var rectangle = new Rectangle(-100000, -100000, 16, 16);
                os.terminal.bounds = new Rectangle(0, 0, width1, height1);
                os.netMap.bounds   = rectangle;
                os.display.bounds  = rectangle;
                os.ram.bounds      = rectangle;
                break;

            case OSTheme.HacknetBlue:
            case OSTheme.HacknetTeal:
            case OSTheme.HacknetYellow:
            case OSTheme.HacknetPurple:
                var height2 = 205;
                var width2  = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.4442);
                var num1    = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.5558) + 1;
                var height3 = height1 - height2 - OS.TOP_BAR_HEIGHT - 6;
                if (theme == OSTheme.HacknetPurple)
                {
                    height3 += 2;
                    ++num1;
                }
                os.terminal.Bounds = new Rectangle(width1 - width2 - 2, OS.TOP_BAR_HEIGHT, width2,
                                                   height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, height1 - height2 - 2, num1 - 2,
                                                 height2);
                os.display.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, num1 - 2, height3);
                os.ram.Bounds     = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH,
                                                  os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.HackerGreen:
                var height4 = 205;
                var width3  = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.4442);
                var num2    = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.5558);
                var height5 = height1 - height4 - OS.TOP_BAR_HEIGHT - 6;
                os.terminal.Bounds = new Rectangle(width1 - width3 - RamModule.MODULE_WIDTH - 4, OS.TOP_BAR_HEIGHT,
                                                   width3, height1 - OS.TOP_BAR_HEIGHT - 2);
                os.netMap.Bounds  = new Rectangle(2, height1 - height4 - 2, num2 - 1, height4);
                os.display.Bounds = new Rectangle(2, OS.TOP_BAR_HEIGHT, num2 - 2, height5);
                os.ram.Bounds     = new Rectangle(width1 - RamModule.MODULE_WIDTH - 2, OS.TOP_BAR_HEIGHT,
                                                  RamModule.MODULE_WIDTH, os.totalRam + RamModule.contentStartOffset);
                break;

            case OSTheme.HacknetMint:
                var height6 = 205;
                var num3    = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.5058);
                var width4  = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.4942);
                var height7 = height1 - height6 - OS.TOP_BAR_HEIGHT - 6;
                os.terminal.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, width4, height7);
                os.netMap.Bounds   = new Rectangle(RamModule.MODULE_WIDTH + 4, height1 - height6 - 2, width4 - 1,
                                                   height6);
                os.display.Bounds = new Rectangle(width1 - num3 - 2, OS.TOP_BAR_HEIGHT, num3 - 1,
                                                  height1 - OS.TOP_BAR_HEIGHT - 2);
                os.ram.Bounds = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH,
                                              os.totalRam + RamModule.contentStartOffset);
                break;

            default:
                var height8 = 205;
                var width5  = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.4442);
                var width6  = (int)((width1 - RamModule.MODULE_WIDTH - 6) * 0.5558);
                var height9 = height1 - height8 - OS.TOP_BAR_HEIGHT - 6;
                os.terminal.Bounds = new Rectangle(width1 - width5 - 2, OS.TOP_BAR_HEIGHT, width5, height9);
                os.netMap.Bounds   = new Rectangle(RamModule.MODULE_WIDTH + 4 + width6 + 4, height1 - height8 - 2,
                                                   os.terminal.bounds.Width - 4, height8);
                os.display.Bounds = new Rectangle(RamModule.MODULE_WIDTH + 4, OS.TOP_BAR_HEIGHT, width6,
                                                  height1 - OS.TOP_BAR_HEIGHT - 2);
                os.ram.Bounds = new Rectangle(2, OS.TOP_BAR_HEIGHT, RamModule.MODULE_WIDTH,
                                              os.totalRam + RamModule.contentStartOffset);
                break;
            }
        }
Ejemplo n.º 33
0
        public override void Draw(float t)
        {
            base.Draw(t);
            this.drawOutline();
            this.drawTarget("app:");
            Rectangle rectangle = Utils.InsetRectangle(this.GetContentAreaDest(), 1);
            float     amount    = this.os.warningFlashTimer / OS.WARNING_FLASH_TIME;
            float     minHeight = 2f;

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

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

            case SequencerExe.SequencerExeState.AwaitingActivation:
                int       height = 30;
                Rectangle destinationRectangle2 = new Rectangle(this.bounds.X + 1, this.bounds.Y + this.bounds.Height / 2 - height, this.bounds.Width - 2, height * 2);
                this.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, LocaleTerms.Loc("ACTIVATE"), new Color?(this.os.highlightColor)))
                {
                    break;
                }
                if (this.os.TraceDangerSequence.IsActive)
                {
                    this.os.write("SEQUENCER ERROR: OS reports critical action already in progress.");
                }
                else
                {
                    this.stateTimer             = 0.0f;
                    this.state                  = SequencerExe.SequencerExeState.SpinningUp;
                    this.bars.MinLineChangeTime = 0.1f;
                    this.bars.MaxLineChangeTime = 1f;
                    this.originalTheme          = ThemeManager.currentTheme;
                    MusicManager.FADE_TIME      = 0.6f;
                    this.oldSongName            = MusicManager.currentSongName;
                    MusicManager.transitionToSong("Music\\Roller_Mobster_Clipped");
                    MediaPlayer.IsRepeating = false;
                    this.targetComp         = Programs.getComputer(this.os, this.targetID);
                    WebServerDaemon daemon = (WebServerDaemon)this.targetComp.getDaemon(typeof(WebServerDaemon));
                    if (daemon != null)
                    {
                        daemon.LoadWebPage("index.html");
                    }
                }
                break;

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

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