Beispiel #1
0
        public override void Load()
        {
            Init();

            meleePrefixes.Add(PrefixType("Mental"));

            if (!Main.dedServ)
            {
                // Mythic Resource Bar
                MythicResourceBar = new MythicResourceBar();
                _mythicResourceBarUserInterface = new UserInterface();
                _mythicResourceBarUserInterface.SetState(MythicResourceBar);
            }

            Mundane.AddHacks();

            DevSpeedHotKey = RegisterHotKey("Dev's Speed", "X");
            SecretHotKey   = RegisterHotKey("Unlocalized Name", "S");

            // Register a new music box
            //AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Annihilator"), ModContent.ItemType<Items.Placeable.MusicBoxes.AnnihilatorMusicBox>(), ModContent.TileType<Tiles.MusicBoxes.AnnihilatorMusicBox>());
            //AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/PaperCut"), ModContent.ItemType<Items.Placeable.MusicBoxes.PaperCutMusicBox>(), ModContent.TileType<Tiles.MusicBoxes.PaperCutMusicBox>());
            AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Annihilator"), ModContent.ItemType <Items.Placeable.MusicBoxes.AnnihilatorMusicBox>(), ModContent.TileType <Tiles.MusicBoxes.AnnihilatorMusicBox>());
            AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/PaperCut"), ModContent.ItemType <Items.Placeable.MusicBoxes.PaperCutMusicBox>(), ModContent.TileType <Tiles.MusicBoxes.PaperCutMusicBox>());

            if (yabhb != null)
            {
                #region The Annihilator
                yabhb.Call("RegisterMechHealthBarMulti",
                           ModContent.NPCType <TheAnnihilator>(),
                           ModContent.NPCType <TheAnnihilatorStage2>(),
                           ModContent.NPCType <TheAnnihilatorStage3>(),
                           ModContent.NPCType <TheAnnihilatorStage3_2>());
                #endregion

                #region Paper Cut
                yabhb.Call("hbStart");
                // Set custom textures for the standard health bar
                // Values can be left as null to use the default textures
                yabhb.Call("hbSetTexture",
                           GetTexture("UI/Health Bars/PaperHealthBarStart"),
                           GetTexture("UI/Health Bars/PaperHealthBarMiddle"),
                           GetTexture("UI/Health Bars/PaperHealthBarEnd"),
                           GetTexture("UI/Health Bars/PaperHealthBarFill"));

                /*// Set custom textures for the standard health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureExpert",
                 *  GetTexture("UI/Health Bars/CustomLeftBar_Expert"),
                 *  GetTexture("UI/Health Bars/CustomMidBar_Expert"),
                 *  GetTexture("UI/Health Bars/CustomRightBar_Expert"));*/

                /*// Set custom textures for the small health bar
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmall",
                 *  GetTexture("UI/Health Bars/CustomLeftBar_Small"),
                 *  GetTexture("UI/Health Bars/CustomMidBar_Small"),
                 *  GetTexture("UI/Health Bars/CustomRightBar_Small"),
                 *  GetTexture("UI/Health Bars/CustomMidFill_Small"));*/

                /*// Set custom textures for the small health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmallExpert",
                 *  GetTexture("UI/Health Bars/CustomLeftBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/CustomMidBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/CustomRightBar_Small_Expert"));*/
                // Methods for setting the offsets. See part 1 of the tutorial for more information.
                yabhb.Call("hbSetMidBarOffsetY", 10);
                yabhb.Call("hbSetMidBarOffset", 30, 10);
                yabhb.Call("hbSetBossHeadCentre", 80, 32);
                yabhb.Call("hbSetBossHeadCentreSmall", 14, 14);
                yabhb.Call("hbSetFillDecoOffset", 10);
                yabhb.Call("hbSetFillDecoOffsetSmall", 10);
                // Set the three colours the bar will change colours between. Defaults to (Green -> Yellow -> Red)
                yabhb.Call("hbSetColours",
                           new Color(0f, 1f, 0f),  // 100%
                           new Color(1f, 1f, 0f),  // 50%
                           new Color(1f, 0f, 0f)); // 0%

                // Force the health bar to use a custom texture as the boss head icon.
                // A useful array to grab textures from is Main.npcHeadBossTexture[]
                yabhb.Call("hbSetBossHeadTexture", GetTexture("NPCs/PaperCut/PaperCut_Head_Boss"));
                // Registers the health bar for multiple NPCs in a group
                yabhb.Call("hbFinishMultiple",
                           ModContent.NPCType <PaperCut>(),
                           ModContent.NPCType <PaperCutStage2>(),
                           ModContent.NPCType <PaperCutStage3>(),
                           ModContent.NPCType <PaperCutStage3_2>());
                #endregion

                #region The Celestials
                #region The Celestial Lord
                yabhb.Call("hbStart");
                // Set custom textures for the standard health bar
                // Values can be left as null to use the default textures
                yabhb.Call("hbSetTexture",
                           GetTexture("UI/Health Bars/TheCelestialHealthBarStart"),
                           GetTexture("UI/Health Bars/TheCelestialHealthBarMiddle"),
                           GetTexture("UI/Health Bars/TheCelestialHealthBarEnd"),
                           GetTexture("UI/Health Bars/TheCelestialHealthBarFill"));

                /*// Set custom textures for the standard health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureExpert",
                 *  GetTexture("UI/Health Bars/TheCelestialLeftBar_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidBar_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialRightBar_Expert"));*/

                /*// Set custom textures for the small health bar
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmall",
                 *  GetTexture("UI/Health Bars/TheCelestialLeftBar_Small"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidBar_Small"),
                 *  GetTexture("UI/Health Bars/TheCelestialRightBar_Small"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidFill_Small"));*/

                /*// Set custom textures for the small health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmallExpert",
                 *  GetTexture("UI/Health Bars/TheCelestialLeftBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialRightBar_Small_Expert"));*/
                // Methods for setting the offsets. See part 1 of the tutorial for more information.
                yabhb.Call("hbSetMidBarOffsetY", 10);
                yabhb.Call("hbSetMidBarOffset", 30, 10);
                yabhb.Call("hbSetBossHeadCentre", 80, 32);
                yabhb.Call("hbSetBossHeadCentreSmall", 14, 14);
                yabhb.Call("hbSetFillDecoOffset", 10);
                yabhb.Call("hbSetFillDecoOffsetSmall", 10);
                // Set the three colours the bar will change colours between. Defaults to (Red -> Orange -> Yellow -> Green -> Blue -> Purple)
                yabhb.Call("hbSetColours",
                           new Color(1f, 0f, 0f), // 100%
                           Color.Red,             // 80%
                           Color.Orange,          // 60%
                           Color.Yellow,          // 40%
                           Color.Green,           // 20%
                           Color.Blue,            // 20%
                           Color.Purple);         // 0%

                // Force the health bar to use a custom texture as the boss head icon.
                // A useful array to grab textures from is Main.npcHeadBossTexture[]
                yabhb.Call("hbSetBossHeadTexture", GetTexture("NPCs/TheCelestial/TheCelestial_Head_Boss"));
                // Registers the health bar for multiple NPCs in a group
                yabhb.Call("hbFinishMultiple",
                           ModContent.NPCType <TheCelestial>(),
                           ModContent.NPCType <TheCelestialClone>());
                #endregion
#if false
                #region The Celestial Enemies
                yabhb.Call("hbStart");
                // Set custom textures for the standard health bar
                // Values can be left as null to use the default textures
                yabhb.Call("hbSetTexture",
                           GetTexture("UI/Health Bars/TheCelestialHealthBarStart"),
                           GetTexture("UI/Health Bars/TheCelestialHealthBarMiddle"),
                           GetTexture("UI/Health Bars/TheCelestialHealthBarEnd"),
                           GetTexture("UI/Health Bars/TheCelestialHealthBarFill"));

                /*// Set custom textures for the standard health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureExpert",
                 *  GetTexture("UI/Health Bars/TheCelestialLeftBar_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidBar_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialRightBar_Expert"));*/

                /*// Set custom textures for the small health bar
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmall",
                 *  GetTexture("UI/Health Bars/TheCelestialLeftBar_Small"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidBar_Small"),
                 *  GetTexture("UI/Health Bars/TheCelestialRightBar_Small"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidFill_Small"));*/

                /*// Set custom textures for the small health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmallExpert",
                 *  GetTexture("UI/Health Bars/TheCelestialLeftBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialMidBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/TheCelestialRightBar_Small_Expert"));*/
                // Methods for setting the offsets. See part 1 of the tutorial for more information.
                yabhb.Call("hbSetMidBarOffsetY", 10);
                yabhb.Call("hbSetMidBarOffset", 30, 10);
                yabhb.Call("hbSetBossHeadCentre", 80, 32);
                yabhb.Call("hbSetBossHeadCentreSmall", 14, 14);
                yabhb.Call("hbSetFillDecoOffset", 10);
                yabhb.Call("hbSetFillDecoOffsetSmall", 10);
                // Set the three colours the bar will change colours between. Defaults to (Green -> Yellow -> Red)
                yabhb.Call("hbSetColours",
                           new Color(0f, 1f, 0f),  // 100%
                           new Color(1f, 1f, 0f),  // 50%
                           new Color(1f, 0f, 0f)); // 0%

                // Force the health bar to use a custom texture as the boss head icon.
                // A useful array to grab textures from is Main.npcHeadBossTexture[]
                yabhb.Call("hbSetBossHeadTexture", GetTexture("NPCs/TheCelestial/TheCelestialClone_Head_Boss"));
                // Registers the health bar for multiple NPCs in a group
                yabhb.Call("hbFinishMultiple",
                           ModContent.NPCType <WhiteCelestial>(),
                           ModContent.NPCType <BlackCelestial>(),
                           ModContent.NPCType <BlueCelestial>(),
                           ModContent.NPCType <PurpleCelestial>(),
                           ModContent.NPCType <YellowCelestial>(),
                           ModContent.NPCType <RainbowCelestialNPC>());
                #endregion */
#endif
                #endregion

                #region The 404 Infused Celestials
                #region The 404 Infused Celestial Lord
                yabhb.Call("hbStart");
                // Set custom textures for the standard health bar
                // Values can be left as null to use the default textures
                yabhb.Call("hbSetTexture",
                           GetTexture("UI/Health Bars/The404CelestialHealthBarStart"),
                           GetTexture("UI/Health Bars/The404CelestialHealthBarMiddle"),
                           GetTexture("UI/Health Bars/The404CelestialHealthBarEnd"),
                           GetTexture("UI/Health Bars/The404CelestialHealthBarFill"));

                /*// Set custom textures for the standard health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureExpert",
                 *  GetTexture("UI/Health Bars/The404CelestialLeftBar_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidBar_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialRightBar_Expert"));*/

                /*// Set custom textures for the small health bar
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmall",
                 *  GetTexture("UI/Health Bars/The404CelestialLeftBar_Small"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidBar_Small"),
                 *  GetTexture("UI/Health Bars/The404CelestialRightBar_Small"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidFill_Small"));*/

                /*// Set custom textures for the small health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmallExpert",
                 *  GetTexture("UI/Health Bars/The404CelestialLeftBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialRightBar_Small_Expert"));*/
                // Methods for setting the offsets. See part 1 of the tutorial for more information.
                yabhb.Call("hbSetMidBarOffsetY", 10);
                yabhb.Call("hbSetMidBarOffset", 30, 10);
                yabhb.Call("hbSetBossHeadCentre", 80, 32);
                yabhb.Call("hbSetBossHeadCentreSmall", 14, 14);
                yabhb.Call("hbSetFillDecoOffset", 10);
                yabhb.Call("hbSetFillDecoOffsetSmall", 10);
                // Set the three colours the bar will change colours between. Defaults to (Red -> Orange -> Yellow -> Green -> Blue -> Purple)
                yabhb.Call("hbSetColours",
                           new Color(1f, 0f, 0f), // 100%
                           Color.Red,             // 80%
                           Color.Orange,          // 60%
                           Color.Yellow,          // 40%
                           Color.Green,           // 20%
                           Color.Blue,            // 20%
                           Color.Purple);         // 0%

                // Force the health bar to use a custom texture as the boss head icon.
                // A useful array to grab textures from is Main.npcHeadBossTexture[]
                yabhb.Call("hbSetBossHeadTexture", GetTexture("NPCs/The404Celestial/The404Celestial_Head_Boss"));
                // Registers the health bar for multiple NPCs in a group
                yabhb.Call("hbFinishMultiple",
                           ModContent.NPCType <The404Celestial>(),
                           ModContent.NPCType <The404CelestialClone>());
                #endregion
#if false
                #region The 404 Infused Celestial Enemies
                yabhb.Call("hbStart");
                // Set custom textures for the standard health bar
                // Values can be left as null to use the default textures
                yabhb.Call("hbSetTexture",
                           GetTexture("UI/Health Bars/The404CelestialHealthBarStart"),
                           GetTexture("UI/Health Bars/The404CelestialHealthBarMiddle"),
                           GetTexture("UI/Health Bars/The404CelestialHealthBarEnd"),
                           GetTexture("UI/Health Bars/The404CelestialHealthBarFill"));

                /*// Set custom textures for the standard health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureExpert",
                 *  GetTexture("UI/Health Bars/The404CelestialLeftBar_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidBar_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialRightBar_Expert"));*/

                /*// Set custom textures for the small health bar
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmall",
                 *  GetTexture("UI/Health Bars/The404CelestialLeftBar_Small"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidBar_Small"),
                 *  GetTexture("UI/Health Bars/The404CelestialRightBar_Small"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidFill_Small"));*/

                /*// Set custom textures for the small health bar in expert mode
                 * // Values can be left as null to use the default textures
                 * yabhb.Call("hbSetTextureSmallExpert",
                 *  GetTexture("UI/Health Bars/The404CelestialLeftBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialMidBar_Small_Expert"),
                 *  GetTexture("UI/Health Bars/The404CelestialRightBar_Small_Expert"));*/
                // Methods for setting the offsets. See part 1 of the tutorial for more information.
                yabhb.Call("hbSetMidBarOffsetY", 10);
                yabhb.Call("hbSetMidBarOffset", 30, 10);
                yabhb.Call("hbSetBossHeadCentre", 80, 32);
                yabhb.Call("hbSetBossHeadCentreSmall", 14, 14);
                yabhb.Call("hbSetFillDecoOffset", 10);
                yabhb.Call("hbSetFillDecoOffsetSmall", 10);
                // Set the three colours the bar will change colours between. Defaults to (Green -> Yellow -> Red)
                yabhb.Call("hbSetColours",
                           new Color(0f, 1f, 0f),  // 100%
                           new Color(1f, 1f, 0f),  // 50%
                           new Color(1f, 0f, 0f)); // 0%

                // Force the health bar to use a custom texture as the boss head icon.
                // A useful array to grab textures from is Main.npcHeadBossTexture[]
                yabhb.Call("hbSetBossHeadTexture", GetTexture("NPCs/The404Celestial/The404CelestialClone_Head_Boss"));
                // Registers the health bar for multiple NPCs in a group
                yabhb.Call("hbFinishMultiple",
                           ModContent.NPCType <WhiteCelestial>(),
                           ModContent.NPCType <BlackCelestial>(),
                           ModContent.NPCType <BlueCelestial>(),
                           ModContent.NPCType <PurpleCelestial>(),
                           ModContent.NPCType <YellowCelestial>(),
                           ModContent.NPCType <RainbowCelestialNPC>());
                #endregion */
#endif
                #endregion
            }
        }