Esempio n. 1
0
        public override void Load()
        {
            noxiumInstance = GetInstance <NoxiumMod>();

            SeedHotkey = RegisterHotKey("Seed Fruit", "C");

            if (!Main.dedServ)
            {
                AhmUI          = new AhmBar();
                AHMUiInterface = new UserInterface();
                AHMUiInterface.SetState(AhmUI);

                dimensionalUI = new DimensionalUI();
                dimensionalUI.LoadUI();
                dimensionalUI.Activate();

                JoiningUI.LoadLoadingSymbol();

                /* Examples:
                 *
                 *              dimensionalUI.RegisterDimension("The Cum Zone", ModContent.GetTexture("Terraria/Item_2"), () => Main.dayTime, () => Main.NewText("Welcome to the cum zone"));
                 *              // Appears as 'The Cum Zone', shows a dirt block texture, only appears in the day, when clicked will say 'Welcome to the cum zone'.
                 *
                 *              dimensionalUI.RegisterDimension("Hell", ModContent.GetTexture("Terraria/Item_1"), () => !Main.dayTime, () => Main.NewText("Welcome to hell"));
                 *              // Appears as 'Hell', shows an iron pickaxe texture, only appears at night, when clicked will say 'Welcome to hell'.
                 *
                 *              Call("AddDimension", "The Cum Zone", ModContent.GetTexture("Terraria/Item_2"), (Func<bool>)(() => Main.dayTime), (Action)(() => Main.NewText("Welcome to the cum zone")));
                 *              // Example of a mod.Call to add a dimension.
                 *
                 */
                // Gaming
                dimensionalUI.RegisterDimension("Plasma Desert", ModContent.GetTexture("NoxiumMod/PlasmaDesert"), () => true, () => Subworld.Enter <PlasmaDesert>());
                dimensionalUI.RegisterDimension("The Cum Zone", ModContent.GetTexture("Terraria/Item_2"), () => true, () => Main.NewText("Welcome to the cum zone"));

                dimensionalInterface = new UserInterface();
            }

            Mod yabhb = ModLoader.GetMod("FKBossHealthBar");

            if (yabhb != null)
            {
                yabhb.Call("hbStart");
                yabhb.Call("hbSetTexture", GetTexture("UI/AhmHealthStart"), GetTexture("UI/AhmHealthMid"), GetTexture("UI/AhmHealthEnd"), GetTexture("UI/AhmHealthFill"));
                yabhb.Call("hbFinishSingle", NPCType("AncientHealingMachine"));
            }
        }
Esempio n. 2
0
        public override void Load()
        {
            noxiumInstance = GetInstance <NoxiumMod>();

            vanillaScreenMatrix = typeof(SpriteViewMatrix).GetField("_transformationMatrix", BindingFlags.NonPublic | BindingFlags.Instance);
            vanillaUIMatrix     = typeof(Main).GetField("_uiScaleMatrix", BindingFlags.NonPublic | BindingFlags.Static);

            On.Terraria.Graphics.SpriteViewMatrix.ShouldRebuild += (On.Terraria.Graphics.SpriteViewMatrix.orig_ShouldRebuild orig, SpriteViewMatrix self) =>
            {
                if (doingBarrelRoll)
                {
                    return(false);
                }
                return(orig(self));
            };

            ComputerUI.PleaseForTheLoveOfGodDontOpenChatWhenIPressEnter();

            HitboxesGlobalItem.meleeHitbox = new Rectangle?[256];

            SeedHotkey = RegisterHotKey("Seed Fruit", "C");

            if (!Main.dedServ)
            {
                AhmUI          = new AhmBar();
                AHMUiInterface = new UserInterface();
                AHMUiInterface.SetState(AhmUI);

                dimensionalUI = new DimensionalUI();
                dimensionalUI.LoadUI();
                dimensionalUI.Activate();

                computerInterface = new UserInterface();
                computerUI        = new ComputerUIState();
                computerUI.Activate();

                JoiningUI.LoadLoadingSymbol();

                PlasmaDesert.LoadBubbleTextures();

                /* Examples:
                 *
                 *              dimensionalUI.RegisterDimension("The Cum Zone", ModContent.GetTexture("Terraria/Item_2"), () => Main.dayTime, () => Main.NewText("Welcome to the cum zone"));
                 *              // Appears as 'The Cum Zone', shows a dirt block texture, only appears in the day, when clicked will say 'Welcome to the cum zone'.
                 *
                 *              dimensionalUI.RegisterDimension("Hell", ModContent.GetTexture("Terraria/Item_1"), () => !Main.dayTime, () => Main.NewText("Welcome to hell"));
                 *              // Appears as 'Hell', shows an iron pickaxe texture, only appears at night, when clicked will say 'Welcome to hell'.
                 *
                 *              Call("AddDimension", "The Cum Zone", ModContent.GetTexture("Terraria/Item_2"), (Func<bool>)(() => Main.dayTime), (Action)(() => Main.NewText("Welcome to the cum zone")));
                 *              // Example of a mod.Call to add a dimension.
                 *
                 */
                // Gaming
                dimensionalUI.RegisterDimension("Plasma Desert", ModContent.GetTexture("NoxiumMod/PlasmaDesert"), () => true, () => Subworld.Enter <PlasmaDesert>());
                dimensionalUI.RegisterDimension("The Cum Zone", ModContent.GetTexture("Terraria/Item_2"), () => true, () => Main.NewText("Welcome to the cum zone"));

                dimensionalInterface = new UserInterface();
            }

            Mod yabhb = ModLoader.GetMod("FKBossHealthBar");

            if (yabhb != null)
            {
                yabhb.Call("hbStart");
                yabhb.Call("hbSetTexture", GetTexture("UI/AhmHealthStart"), GetTexture("UI/AhmHealthMid"), GetTexture("UI/AhmHealthEnd"), GetTexture("UI/AhmHealthFill"));
                yabhb.Call("hbFinishSingle", NPCType("AncientHealingMachine"));
            }
        }