Exemplo n.º 1
0
 public override void Unload()
 {
     Main.OnPostDraw    -= DrawCircle;
     Main.OnPostDraw    -= Welcome;
     Helper.EntroptPool  = new int[0];
     TimeTravelingPotion = null;
 }
        public override void Load()
        {
            ResetDeathCache = RegisterHotKey("Reset Death Cache", "Home");
            SwapInventory swap = new SwapInventory();

            AddGlobalItem("swapper", swap);
        }
Exemplo n.º 3
0
        public override void Load()
        {
            Config.Load();
            ModTranslation text = CreateTranslation("Change1");

            text.SetDefault("Sniper scope is disabled");
            text.AddTranslation(GameCulture.Russian, "Снайперский прицел выключен");
            AddTranslation(text);
            text = CreateTranslation("Change2");
            text.SetDefault("Sniper scope is enabled");
            text.AddTranslation(GameCulture.Russian, "Снайперский прицел включён");
            AddTranslation(text);
            text = CreateTranslation("DC1");
            text.SetDefault("Damage type changed to Magic");
            text.AddTranslation(GameCulture.Russian, "Тип урона изменён на Магический");
            AddTranslation(text);
            text = CreateTranslation("DC2");
            text.SetDefault("Damage type changed to Melee");
            text.AddTranslation(GameCulture.Russian, "Тип урона изменён на Ближний");
            AddTranslation(text);
            LampLight = RegisterHotKey("Lamp Light Toggle", "L");
            if (!Main.dedServ)
            {
                AddEquipTexture(null, EquipType.Legs, "somebody0214Robe_Legs", "AlchemistNPC/Items/Armor/somebody0214Robe_Legs");
            }
        }
Exemplo n.º 4
0
        public override void Unload()
        {
            // All code below runs only if we're not loading on a server
            if (!Main.dedServ)
            {
                // Main.music[MusicID.Dungeon] = Main.soundBank.GetCue("Music_" + MusicID.Dungeon);
                Main.tileFrame[TileID.Loom]      = 0;            // Reset the frame of the loom tile
                Main.tileSetsLoaded[TileID.Loom] = false;        // Causes the loom tile to reload its vanilla texture
                GameShaders.Misc.Remove("ExampleMod:DeathAnimation");

                Filters.Scene.Remove("ExampleMod:PuritySpirit");
                SkyManager.Instance.Remove("ExampleMod:PuritySpirit");
                Filters.Scene.Remove("ExampleMod:MonolithVoid");
                SkyManager.Instance.Remove("ExampleMod:MonolithVoid");

                GameShaders.Armor.Remove(ItemType <Items.ExampleDye>());
            }

            // Unload static references
            // You need to clear static references to assets (Texture2D, SoundEffects, Effects).
            exampleEffect = null;

            // In addition to that, if you want your mod to completely unload during unload, you need to clear static references to anything referencing your Mod class
            instance         = null;
            RandomBuffHotKey = null;
        }
Exemplo n.º 5
0
        public override void Load()
        {
            Instance = this;

            FrozenStandOnNPCs = new int[] { this.NPCType("Ripper") };

            SpiderBallKey = RegisterHotKey("Spider Ball", "X");
            BoostBallKey  = RegisterHotKey("Boost Ball", "F");
            PowerBombKey  = RegisterHotKey("Power Bomb", "R");
            SenseMoveKey  = RegisterHotKey("Use Sense Move", "F");

            if (!Main.dedServ)
            {
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Serris"), ItemType("SerrisMusicBox"), TileType("SerrisMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Kraid"), ItemType("KraidPhantoonMusicBox"), TileType("KraidPhantoonMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Ridley"), ItemType("RidleyMusicBox"), TileType("RidleyMusicBox"));
            }
            for (int s = 1; s <= 7; s++)
            {
                AddBossHeadTexture(SerrisHead + s);
            }
            for (int k = 0; k <= 3; k++)
            {
                AddBossHeadTexture(KraidHead + k);
            }

            AddBossHeadTexture(TorizoHead);
            AddBossHeadTexture(PhantoonHead);
            AddBossHeadTexture(NightmareHead);
            AddBossHeadTexture(OmegaPirateHead);

            SetupUI();
        }
Exemplo n.º 6
0
        // to do: debugmode, stat

        public override void Load()
        {
            // Since we are using hooks not in older versions, and since ItemID.Count changed, we need to do this.
            if (ModLoader.version < new Version(0, 10))
            {
                throw new Exception("\nThis mod uses functionality only present in the latest tModLoader. Please update tModLoader to use this mod\n\n");
            }
            instance = this;

            ButtonClicked.Clear();
            ButtonTexture.Clear();
            ButtonTooltip.Clear();

            ToggleCheatSheetHotbarHotKey = RegisterHotKey("Toggle Cheat Sheet Hotbar", "K");

            if (Main.rand == null)
            {
                Main.rand = new Terraria.Utilities.UnifiedRandom();
            }

            ModTranslation text = CreateTranslation("ButcherNotification");

            text.SetDefault("NPCs were butchered by {0}");
            AddTranslation(text);
            text = CreateTranslation("VacuumNotification");
            text.SetDefault("Items on the ground were vacuumed by {0}");
            AddTranslation(text);
            text = CreateTranslation("SpawnNPCNotification");
            text.SetDefault("Spawned {0} by {1}");
            AddTranslation(text);
            text = CreateTranslation("VolcanoWarning");
            text.SetDefault("Did you hear something....A Volcano! Find Cover!");
            AddTranslation(text);
        }
Exemplo n.º 7
0
        public override void Load()
        {
            Config.Load();
            ModTranslation text = CreateTranslation("DC1");

            text.SetDefault("Damage type changed to Magic");
            text.AddTranslation(GameCulture.Russian, "Тип урона изменён на Магический");
            AddTranslation(text);
            text = CreateTranslation("DC2");
            text.SetDefault("Damage type changed to Melee");
            text.AddTranslation(GameCulture.Russian, "Тип урона изменён на Ближний");
            AddTranslation(text);
            LampLight = RegisterHotKey("Lamp Light Toggle", "L");
            if (!Main.dedServ)
            {
                AddEquipTexture(null, EquipType.Legs, "somebody0214Robe_Legs", "AlchemistNPC/Items/Armor/somebody0214Robe_Legs");
            }
            ReversivityCoinTier1ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier1Data(ItemType <Items.ReversivityCoinTier1>(), 999L));
            ReversivityCoinTier2ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier2Data(ItemType <Items.ReversivityCoinTier2>(), 999L));
            ReversivityCoinTier3ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier3Data(ItemType <Items.ReversivityCoinTier3>(), 999L));
            ReversivityCoinTier4ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier4Data(ItemType <Items.ReversivityCoinTier4>(), 999L));
            ReversivityCoinTier5ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier5Data(ItemType <Items.ReversivityCoinTier5>(), 999L));
            ReversivityCoinTier6ID = CustomCurrencyManager.RegisterCurrency(new ReversivityCoinTier6Data(ItemType <Items.ReversivityCoinTier6>(), 999L));
            instance = this;
        }
Exemplo n.º 8
0
        public override void Load()
        {
            instance = this;

            GuardianSoulHotKey = RegisterHotKey("Guardian Soul", "F");

            ListBossSoul = new List <int>();
            ListBossSoul.AddRange(new int[] {
                NPCID.KingSlime, NPCID.EyeofCthulhu, NPCID.EaterofWorldsHead, NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, NPCID.BrainofCthulhu,
                NPCID.QueenBee, NPCID.SkeletronHead, NPCID.SkeletronHand, NPCID.WallofFlesh, NPCID.WallofFleshEye,
                NPCID.TheDestroyer, NPCID.TheDestroyerBody, NPCID.TheDestroyerTail, NPCID.Retinazer, NPCID.Spazmatism,
                NPCID.SkeletronPrime, NPCID.PrimeCannon, NPCID.PrimeLaser, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.Plantera,
                NPCID.Golem, NPCID.GolemFistLeft, NPCID.GolemFistRight, NPCID.GolemHead, NPCID.GolemHeadFree, NPCID.CultistBoss, NPCID.DukeFishron,
                NPCID.MoonLordCore, NPCID.MoonLordFreeEye, NPCID.MoonLordHand, NPCID.MoonLordHead
            });
            ListSoul = new List <int>();

            if (Main.dedServ)
            {
                return;
            }
            ui = new SoulUI();
            ui.Activate();
            userInterface = new UserInterface();
            userInterface.SetState(ui);
        }
Exemplo n.º 9
0
        // to do: debugmode, stat

        public override void Load()
        {
            // Since we are using hooks not in older versions, and since ItemID.Count changed, we need to do this.
            if (ModLoader.version < new Version(0, 10, 1, 3))
            {
                throw new Exception("\nThis mod uses functionality only present in the latest tModLoader. Please update tModLoader to use this mod\n\n");
            }
            instance = this;

            ButtonClicked.Clear();
            ButtonTexture.Clear();
            ButtonTooltip.Clear();

            ToggleCheatSheetHotbarHotKey = RegisterHotKey("Toggle Cheat Sheet Hotbar", "K");

            if (Main.rand == null)
            {
                Main.rand = new Terraria.Utilities.UnifiedRandom();
            }

            FieldInfo translationsField = typeof(Mod).GetField("translations", BindingFlags.Instance | BindingFlags.NonPublic);

            translations = (Dictionary <string, ModTranslation>)translationsField.GetValue(this);
            //LoadTranslations();
        }
Exemplo n.º 10
0
 public override void Unload()
 {
     BaseUserInterface = null;
     BaseUIState       = null;
     leftArrow         = null;
     rightArrow        = null;
 }
Exemplo n.º 11
0
        public override void Load()
        {
            // Too many people are downloading 0.10 versions on 0.9....
            if (ModLoader.version < new Version(0, 10))
            {
                throw new Exception("\nThis mod uses functionality only present in the latest tModLoader. Please update tModLoader to use this mod\n\n");
            }
            instance = this;
            ToggleChecklistHotKey = RegisterHotKey("Toggle Boss Checklist", "P");

            tremorLoaded = ModLoader.GetMod("Tremor") != null;

            bossTracker = new BossTracker();

            if (!Main.dedServ)
            {
                bossChecklistUI = new BossChecklistUI();
                bossChecklistUI.Activate();
                bossChecklistInterface = new UserInterface();
                bossChecklistInterface.SetState(bossChecklistUI);

                UICheckbox.checkboxTexture  = GetTexture("checkBox");
                UICheckbox.checkmarkTexture = GetTexture("checkMark");
            }
        }
Exemplo n.º 12
0
        public override void Load()
        {
            if (harmonyInstance == null)
            {
                harmonyInstance = HarmonyInstance.Create(Name);
            }

            harmonyInstance.PatchAll();

            keyToggle   = RegisterHotKey("Toggle", "NumPad1");
            keyStep     = RegisterHotKey("Step", "NumPad2");
            keyAutoStep = RegisterHotKey("Auto step", "NumPad3");
            keySettings = RegisterHotKey("Settings", "NumPad5");

            if (!Main.dedServ)
            {
                settingsUI    = new SettingsUI();
                userInterface = new UserInterface();
                userInterface.SetState(settingsUI);
                settingsUI.Activate();
                UILayer = new LegacyGameInterfaceLayer("MechScope: Settings menu",
                                                       delegate
                {
                    if (settingsUI.Visible)
                    {
                        settingsUI.Draw(Main.spriteBatch);
                        userInterface.Update(Main._drawInterfaceGameTime);
                    }
                    return(true);
                }
                                                       );
            }
        }
Exemplo n.º 13
0
        public override void Unload()
        {
            Unloading = true;
            try
            {
                Main.OnPostDraw -= Main_OnPostDraw;
                Main.OnPreDraw  -= Main_OnPreDraw;
                ModTexturesTable.Clear();
                PassHotkey       = null;
                WashHotkey       = null;
                HookCursorHotKey = null;
                IsCalamityLoaded = false;

                ModHandler.parser    = null;
                ModHandler.delegates = new Dictionary <string, Dictionary <string, Func <bool> > >();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                Instance = null;
                GC.Collect();
            }

            base.Unload();
        }
Exemplo n.º 14
0
        public override void Load()
        {
            Mods = new List <Mod>();
            if (Main.dedServ)
            {
                return;
            }

            modSettingsUI    = new ModSettingsUI();
            modUserInterface = new UserInterface();
            modUserInterface.SetState(modSettingsUI);

            modSettings = new List <ModSetting>();

            ControlModSettings = RegisterHotKey("Open Mod Settings", "Oem8"); // The ` key

            modSettingsUI.Activate();

            ModSetting setting = ModSettingsAPI.CreateModSettingConfig(this);

            // setting.EnableAutoConfig(this);
            setting.AddComment("This is a barebones framework for modifying supported in-game settings! ");
            setting.AddBool("isday", "Day Time", true);
            setting.AddDouble("dayticks", "Current Time", 0, Main.dayLength, true);
            setting.AddFloat("modifyWidth", "Modify Config Width", 700, 2000, false);
            setting.AddComment("Version " + this.Version);
        }
Exemplo n.º 15
0
 public override void Load()
 {
     for (int k = 1; k <= 4; k++)
     {
         AddBossHeadTexture(captiveElementHead + k);
         AddBossHeadTexture(captiveElement2Head + k);
     }
     RandomBuffHotKey     = RegisterHotKey("Random Buff", "P");
     FaceCustomCurrencyID = CustomCurrencyManager.RegisterCurrency(new ExampleCustomCurrency(ItemType <Items.Face>(), 999L));
     if (!Main.dedServ)
     {
         AddEquipTexture(null, EquipType.Legs, "ExampleRobe_Legs", "ExampleMod/Items/Armor/ExampleRobe_Legs");
         //Main.music[MusicID.Dungeon].ModMusic = GetSound("Sounds/Music/ExampleMusic").CreateInstance();
         AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/DriveMusic"), ItemType("ExampleMusicBox"), TileType("ExampleMusicBox"));
         Main.instance.LoadTiles(TileID.Loom);
         Main.tileTexture[TileID.Loom] = GetTexture("Tiles/AnimatedLoom");
         // What if....Replace a vanilla item texture and equip texture.
         //Main.itemTexture[ItemID.CopperHelmet] = GetTexture("Resprite/CopperHelmet_Item");
         //Item copperHelmet = new Item();
         //copperHelmet.SetDefaults(ItemID.CopperHelmet);
         //Main.armorHeadLoaded[copperHelmet.headSlot] = true;
         //Main.armorHeadTexture[copperHelmet.headSlot] = GetTexture("Resprite/CopperHelmet_Head");
         Filters.Scene["ExampleMod:PuritySpirit"]       = new Filter(new PuritySpiritScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.9f, 0.4f).UseOpacity(0.7f), EffectPriority.VeryHigh);
         SkyManager.Instance["ExampleMod:PuritySpirit"] = new PuritySpiritSky();
         Filters.Scene["ExampleMod:MonolithVoid"]       = new Filter(new ScreenShaderData("FilterMoonLord"), EffectPriority.Medium);
         SkyManager.Instance["ExampleMod:MonolithVoid"] = new VoidSky();
         exampleFont = GetFont("Fonts/ExampleFont");
         exampleUI   = new ExampleUI();
         exampleUI.Activate();
         exampleUserInterface = new UserInterface();
         exampleUserInterface.SetState(exampleUI);
     }
 }
Exemplo n.º 16
0
        public override void Load()
        {
            IL.Terraria.Main.DrawMenu += HookMenuSplash;
            IL.Terraria.Main.DoDraw   += HookItemTextDraw;
            if (!dedServ)
            {
                On.Terraria.Lang.GetRandomGameTitle += Lang_GetRandomGameTitle;
                chTitle = true;
            }
            ShiftIsPressed = RegisterHotKey("View Extra Tooltip Details", "LeftAlt");
            if (!dedServ)
            {
                Filters.Scene["InfniteSuffering:RadiatedBiomeSky"]       = new Filter(new ScreenShaderData("FilterTower").UseColor(0.0f, 0.0f, 0.0f).UseOpacity(0.66f), EffectPriority.Low);
                SkyManager.Instance["InfniteSuffering:RadiatedBiomeSky"] = new RadiatedSky();
            }

            for (int i = 0; i < 20; i++)
            {
                rarityText[i] = new RarityPopupText();
            }

            On.Terraria.Item.Prefix      += Item_Prefix;
            On.Terraria.ItemText.NewText += ItemText_NewText;
            On.Terraria.Main.MouseText   += Main_MouseText;
            On.Terraria.ItemText.Update  += ItemText_Update;
        }
Exemplo n.º 17
0
        public override void Load()
        {
            if (Main.rand == null)
            {
                Main.rand = new Terraria.Utilities.UnifiedRandom();
            }
            //Always keep this call in the first line of Load!
            LoadReferences();
            //Don't add any code before LoadReferences(),
            // unless you know what you're doing.

            Filters.Scene["SpiritMod:SpiritSky"]   = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(0f, 0.5f, 1f).UseOpacity(0.3f), EffectPriority.High);
            Filters.Scene["SpiritMod:BlueMoonSky"] = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(0f, 0.3f, 1f).UseOpacity(0.75f), EffectPriority.High);

            instance   = this;
            SpecialKey = RegisterHotKey("Armor Bonus", "Q");
            ReachKey   = RegisterHotKey("Frenzy Plant", "E");
            HolyKey    = RegisterHotKey("Holy Ward", "Z");

            GlyphCustomCurrencyID = CustomCurrencyManager.RegisterCurrency(new Currency(ItemType <Items.Glyphs.Glyph>(), 999L));

            if (!Main.dedServ)
            {
                Filters.Scene["SpiritMod:Overseer"]                = new Filter(new SeerScreenShaderData("FilterMiniTower").UseColor(0f, 0.3f, 1f).UseOpacity(0.75f), EffectPriority.VeryHigh);
                SkyManager.Instance["SpiritMod:Overseer"]          = new SeerSky();
                Filters.Scene["SpiritMod:IlluminantMaster"]        = new Filter(new SeerScreenShaderData("FilterMiniTower").UseColor(1.2f, 0.1f, 1f).UseOpacity(0.75f), EffectPriority.VeryHigh);
                SkyManager.Instance["SpiritMod:IlluminantMasterr"] = new SeerSky();
                Filters.Scene["SpiritMod:Atlas"]       = new Filter(new AtlasScreenShaderData("FilterMiniTower").UseColor(0.5f, 0.5f, 0.5f).UseOpacity(0.6f), EffectPriority.VeryHigh);
                SkyManager.Instance["SpiritMod:Atlas"] = new AtlasSky();
            }
        }
Exemplo n.º 18
0
        public override void Load()
        {
            Main.soundMenuTick  = GetSound("Sounds/Custom/Other/Nothingness");
            Main.soundMenuOpen  = GetSound("Sounds/Custom/Other/Nothingness");
            Main.soundMenuClose = GetSound("Sounds/Custom/Other/Nothingness");
            Mod spooky = ModLoader.GetMod("SpookyTerraria");

            Main.versionNumber = $"Terraria {Main.versionNumber}\n{spooky.Name} v{spooky.Version}";

            Sprint = RegisterHotKey("Sprint", "LeftShift");

            IL.Terraria.Main.DrawMenu += NewDrawMenu;
            On.Terraria.Main.DrawInterface_35_YouDied += Main_DrawInterface_35_YouDied;
            // Shader initialization

            if (!Main.dedServ)
            {
                // Shaders
                Ref <Effect> Darkness = new Ref <Effect>(GetEffect("Effects/Darkness"));
                Filters.Scene["Darkness"] = new Filter(new ScreenShaderData(Darkness, "Darkness"), EffectPriority.VeryHigh);
                // Skies
                Filters.Scene["SpookyTerraria:BlackSky"]       = new Filter(new ScreenShaderData("FilterTower").UseColor(0.0f, 0.0f, 0.0f).UseOpacity(0f), EffectPriority.Medium);
                SkyManager.Instance["SpookyTerraria:BlackSky"] = new BlackSky();
            }
        }
        public override void Load()
        {
            InGameWikiHotkey = RegisterHotKey("In-Game Wiki Hotkey", "f");

            if (!Main.dedServ)
            {
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Acheron"), ItemType("AcheBox"), TileType("AcheBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Arterius"), ItemType("ArterBox"), TileType("ArterBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Forests_Army"), ItemType("ForestBox"), TileType("ForestBox"));
            }

            instance = this;

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

            if (yabhb != null)
            {
                Func <NPC, int, int, Color> customColour = CustomHealthBarColour;
                Func <Texture2D>            fill         = () => GetTexture("UI/YABHB/AcheFill");
                Func <Texture2D>            start        = () => GetTexture("UI/YABHB/AcheBarStart");
                Func <Texture2D>            mid          = () => GetTexture("UI/YABHB/AcheBarMiddle");
                Func <Texture2D>            end          = () => GetTexture("UI/YABHB/AcheBarEnd");
                yabhb.Call("RegisterCustomMethodHealthBar",
                           NPCType("Acheron"),
                           false,
                           null,
                           fill,
                           start, mid, end,
                           null, null, null, null, null, null, null, null, null, null, null, null,
                           customColour
                           );
            }
        }
Exemplo n.º 20
0
        public override void Load()
        {
            instance = this;

            if (!Main.dedServ)
            {
                // 旧設定ファイルの削除
                var oldConfigPath = Path.Combine(Main.SavePath, "Mod Configs", "NPCInfo.json");
                if (File.Exists(oldConfigPath))
                {
                    File.Delete(oldConfigPath);
                }


                UICombatNPCSlot.textures = new Microsoft.Xna.Framework.Graphics.Texture2D[] {
                    Main.heartTexture.Resize(22),
                    Main.itemTexture[3507].Resize(12),
                    Main.EquipPageTexture[0].Resize(12),
                    Main.itemTexture[156].Resize(12),
                };

                ToggleHotKeyNPCInfo = RegisterHotKey("Toggle NPC Info", "X");
                npcInfoTool         = new NPCInfoTool();
            }
        }
Exemplo n.º 21
0
        public override void Unload()
        {
            if (!Main.dedServ)
            {
                concurrentTaskHandlerToken?.Cancel();
                concurrentTaskHandler?.Wait();
            }
            instance                   = null;
            translations               = null;
            itemChecklistInstance      = null;
            LootCache.instance         = null;
            ToggleRecipeBrowserHotKey  = null;
            QueryHoveredItemHotKey     = null;
            RecipeBrowserUI.instance   = null;
            RecipeCatalogueUI.instance = null;
            ItemCatalogueUI.instance   = null;
            BestiaryUI.instance        = null;
            CraftUI.instance           = null;
            RecipePath.Refresh(true);
            RecipeBrowserPlayer.seenTiles = null;

            UIElements.UIRecipeSlot.favoritedBackgroundTexture           = null;
            UIElements.UIRecipeSlot.selectedBackgroundTexture            = null;
            UIElements.UIRecipeSlot.ableToCraftBackgroundTexture         = null;
            UIElements.UIRecipeSlot.ableToCraftExtendedBackgroundTexture = null;
            UIElements.UIMockRecipeSlot.ableToCraftBackgroundTexture     = null;
            UIElements.UICheckbox.checkboxTexture  = null;
            UIElements.UICheckbox.checkmarkTexture = null;
            UIHorizontalGrid.moreLeftTexture       = null;
            UIHorizontalGrid.moreRightTexture      = null;
            Utilities.tileTextures = null;
        }
        public override void Load()
        {
            NetHandler.Load();
            NPCSets.Load();
            SquireMinionTypes.Load();
            NecromancerAccessory.Load();
            SquireGlobalProjectile.Load();
            IdleLocationSets.Load();
            TargetSelectionTacticHandler.Load();
            UserInterfaces.Load();
            MinionTacticsGroupMapper.Load();
            LandChunkConfigs.Load();
            SpriteCompositionManager.Load();
            CritterConfigs.Load();
            AmuletOfManyMinionsWorld.Load();
            CombatPetLevelTable.Load();
            CombatPetBuff.Load();
            DefaultPetsQuizData.Load();

            CycleTacticHotKey       = RegisterHotKey("Cycle Minion Tactic", "K");
            CycleTacticsGroupHotKey = RegisterHotKey("Cycle Tactics Group", "L");
            QuickDefendHotKey       = RegisterHotKey("Minion Quick Defend", "V");
            if (!Main.dedServ)
            {
                AddEquipTexture(null, EquipType.Legs, "RoyalGown_Legs", "AmuletOfManyMinions/Items/Armor/RoyalArmor/RoyalGown_Legs");
            }
        }
        public override void Load()
        {
            instance   = this;
            skill1     = RegisterHotKey("Skill 1", "F2");
            skill2     = RegisterHotKey("Skill 2", "F3");
            skill3     = RegisterHotKey("Skill 3", "F4");
            skill4     = RegisterHotKey("Skill 4", "F5");
            skill5     = RegisterHotKey("Skill 5", "F6");
            skill6     = RegisterHotKey("Skill 6", "F7");
            skill7     = RegisterHotKey("Skill 7", "F8");
            skill8     = RegisterHotKey("Skill 8", "F9");
            skillsList = new SkillsList();
            if (!Main.dedServ)
            {
                mutationInterface = new UserInterface();
                geneInterface     = new UserInterface();
                mutationBar       = new MutationBar();
                mutationBar.Activate();
                mutationInterface.SetState(mutationBar);

                geneUI = new GeneUI();
                geneUI.Activate();
            }
            am = new AttributeManager();
        }
        public override void Unload()
        {
            NetHandler.Unload();
            NPCSets.Unload();
            SquireMinionTypes.Unload();
            NecromancerAccessory.Unload();
            SquireGlobalProjectile.Unload();
            IdleLocationSets.Unload();
            TargetSelectionTacticHandler.Unload();
            UserInterfaces.Unload();
            MinionTacticsGroupMapper.Unload();
            LandChunkConfigs.Unload();
            SpriteCompositionManager.Unload();
            CritterConfigs.Unload();
            AmuletOfManyMinionsWorld.Unload();
            PartyHatSystem.Unload();
            CombatPetLevelTable.Unload();
            CombatPetBuff.Unload();
            BlackCatMinion.Unload();
            QuizResult.Unload();
            DefaultPetsQuizData.Unload();

            CycleTacticHotKey       = null;
            CycleTacticsGroupHotKey = null;
            QuickDefendHotKey       = null;
        }
Exemplo n.º 25
0
        public override void Load()
        {
            Config.Load();
            Instance = this;
            string DiscordBuffTeleportation = Language.GetTextValue("Discord Buff Teleportation");

            DiscordBuff = RegisterHotKey(DiscordBuffTeleportation, "Q");
            SetTranslation();
            instance = this;
            if (!Main.dedServ)
            {
                alchemistUI = new ShopChangeUI();
                alchemistUI.Activate();
                alchemistUserInterface = new UserInterface();
                alchemistUserInterface.SetState(alchemistUI);

                alchemistUIA = new ShopChangeUIA();
                alchemistUIA.Activate();
                alchemistUserInterfaceA = new UserInterface();
                alchemistUserInterfaceA.SetState(alchemistUIA);

                alchemistUIO = new ShopChangeUIO();
                alchemistUIO.Activate();
                alchemistUserInterfaceO = new UserInterface();
                alchemistUserInterfaceO.SetState(alchemistUIO);

                alchemistUIM = new ShopChangeUIM();
                alchemistUIM.Activate();
                alchemistUserInterfaceM = new UserInterface();
                alchemistUserInterfaceM.SetState(alchemistUIM);
            }
        }
Exemplo n.º 26
0
        //Hotkeys
        public override void Load()
        {
            if (!Main.dedServ)
            {                                                                                            //Foreground Filter (RGB)
                Filters.Scene["Laugicality:Etherial"]       = new Filter(new EtherialShader("FilterMiniTower").UseColor(0.1f, 0.4f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh);
                SkyManager.Instance["Laugicality:Etherial"] = new EtherialVisual();
                Filters.Scene["Laugicality:ZaWarudo"]       = new Filter(new ZaShader("FilterMiniTower").UseColor(0.5f, .5f, .5f).UseOpacity(0.5f), EffectPriority.VeryHigh);
                SkyManager.Instance["Laugicality:ZaWarudo"] = new ZaWarudoVisual();



                // Register a new music box
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/DuneSharkron"), ItemType("DuneSharkronMusicBox"), TileType("DuneSharkronMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Hypothema"), ItemType("HypothemaMusicBox"), TileType("HypothemaMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Obsidium"), ItemType("ObsidiumMusicBox"), TileType("ObsidiumMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Ragnar"), ItemType("RagnarMusicBox"), TileType("RagnarMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/RockPhase3"), ItemType("DioritusMusicBox"), TileType("DioritusMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/AnDio"), ItemType("AnDioMusicBox"), TileType("AnDioMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Annihilator"), ItemType("AnnihilatorMusicBox"), TileType("AnnihilatorMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Slybertron"), ItemType("SlybertronMusicBox"), TileType("SlybertronMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/SteamTrain"), ItemType("SteamTrainMusicBox"), TileType("SteamTrainMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Etheria"), ItemType("EtheriaMusicBox"), TileType("EtheriaMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/GreatShadow"), ItemType("GreatShadowMusicBox"), TileType("GreatShadowMusicBox"));
            }
            ToggleMystic     = RegisterHotKey("Toggle Mysticism", "Mouse2");
            ToggleSoulStoneV = RegisterHotKey("Toggle Accessory Visual FX", "V");
            ToggleSoulStoneM = RegisterHotKey("Toggle Accessory Mobility FX", "C");
        }
Exemplo n.º 27
0
        public override void Unload()
        {
            DiscordRPCInfo.Terminate();
            Main.logoTexture              = storedLogo;
            Main.logo2Texture             = storedLogo2;
            Main.soundMenuTick            = tick;
            Main.soundMenuClose           = close;
            Main.soundMenuOpen            = open;
            Main.logoTexture              = storedLogo;
            IL.Terraria.Main.UpdateAudio -= ChangeMenuMusic;
            customTitleMusicSlot          = 6;
            var evt = titleMusicStopped;

            if (evt != null)
            {
                evt.Set();
            }

            titleMusicStopped = null;
            // Wtf...
            Main.versionNumber = "v1.3.5.3";
            SpookyTerrariaUtils.ReturnTexturesToDefaults();

            /*for (int texIteration = 0; texIteration < _texturesDisposable.Length - 1; texIteration++)
             * {
             *  if (_texturesDisposable[texIteration] != null)
             *  {
             *      lock (_texturesDisposable[texIteration])
             *      {
             *          _texturesDisposable[texIteration] = null;
             *      }
             *  }
             * }*/
            Sprint = null;
        }
Exemplo n.º 28
0
        public override void Load()
        {
            Instance = this;

            bagKey = RegisterHotKey("Open Bag", "B");

            TagSerializer.AddSerializer(new FreqSerializer());

            if (!Main.dedServ)
            {
                lootAll    = ModLoader.GetTexture(UITexturePath + "LootAll");
                depositAll = ModLoader.GetTexture(UITexturePath + "DepositAll");

                restack    = new Texture2D[2];
                restack[0] = ModLoader.GetTexture(UITexturePath + "Restack_0");
                restack[1] = ModLoader.GetTexture(UITexturePath + "Restack_1");

                restock = ModLoader.GetTexture(UITexturePath + "Restock");

                vacuumBagOn  = ModLoader.GetTexture(ItemTexturePath + "VacuumBagActive");
                vacuumBagOff = ModLoader.GetTexture(ItemTexturePath + "VacuumBagInactive");

                ringBig   = ModLoader.GetTexture(ItemTexturePath + "RingBig");
                ringSmall = ModLoader.GetTexture(ItemTexturePath + "RingSmall");

                gemsMiddle = new Texture2D[3];
                gemsSide   = new Texture2D[3];
                for (int i = 0; i < 3; i++)
                {
                    gemsMiddle[i] = ModLoader.GetTexture(TileTexturePath + "GemMiddle" + i);
                    gemsSide[i]   = ModLoader.GetTexture(TileTexturePath + "GemSide" + i);
                }
            }
        }
Exemplo n.º 29
0
 /// <summary>
 /// Checks for any of the quick hotkeys.
 /// </summary>
 /// <param name="triggersSet">The triggers set.</param>
 public override void ProcessTriggers(TriggersSet triggersSet)
 {
     if (InventoryHotkeys.QuickHotKeys != null)
     {
         int       itemIndex  = 0;
         ModHotKey keyPressed = null;
         for (int i = 0; i < InventoryHotkeys.QuickHotKeys.Length; i++)
         {
             if (InventoryHotkeys.QuickHotKeys[i] != null)
             {
                 if (InventoryHotkeys.QuickHotKeys[i].JustPressed)
                 {
                     itemIndex  = i + 10;
                     keyPressed = InventoryHotkeys.QuickHotKeys[i];
                 }
             }
         }
         if (keyPressed != null && player != null)
         {
             _PreviousItemBeforeQuickUseKeyIndex = _PreviousItemBeforeQuickUseKeyIndex ?? player.selectedItem;
             _QuickItemIndex = itemIndex;
             _HoldingTheKey  = true;
             _CurrentKey     = keyPressed;
         }
         if (_CurrentKey != null && _CurrentKey.JustReleased)
         {
             _HoldingTheKey = false;
         }
     }
     base.ProcessTriggers(triggersSet);
 }
Exemplo n.º 30
0
        public override void Load()
        {
            Bandolier          = RegisterHotKey("Bondolier", "U");
            VeritasAbilityKey  = RegisterHotKey("Veritas Ability", "V");
            VitalityAbilityKey = RegisterHotKey("Vitality Heal", "G");
            SoulBank           = RegisterHotKey("Soul Bank", "Y");

            if (!Main.dedServ)
            {
                LoadUI();

                // Color params: x=number, y=inverse size, z=speed
                Ref <Effect> screenRef = new Ref <Effect>(GetEffect("Effects/ShockwaveEffect"));
                void RegisterShockwave(string name)
                {
                    Filters.Scene[name] = new Filter(new ScreenShaderData(screenRef, "Shockwave"), EffectPriority.VeryHigh);
                    Filters.Scene[name].Load();
                }

                RegisterShockwave("TaranysPulse");
                RegisterShockwave("TyrantEye1");
                RegisterShockwave("TyrantEye2");
                RegisterShockwave("Nidorose1");
                RegisterShockwave("Nidorose2");
                RegisterShockwave("AborycTake");

                SkyManager.Instance["Erilipah:ErilipahBiome"] = new Biomes.ErilipahBiome.ErilipahSky();
                Filters.Scene["Erilipah:ErilipahBiome"]       = new Filter(new ScreenShaderData("FilterMoonLord").UseIntensity(0.55f), EffectPriority.Low);
            }

            On.Terraria.Main.DrawBuffIcon += DrawBuffIconDust;
        }