Exemplo n.º 1
0
 public override void Load()
 {
     SpendUIHotKey      = KeybindLoader.RegisterKeybind(this, "Open SpendUI", Microsoft.Xna.Framework.Input.Keys.P);
     SpendModFive       = KeybindLoader.RegisterKeybind(this, "Spend 5 points", Microsoft.Xna.Framework.Input.Keys.LeftShift);
     SpendModTen        = KeybindLoader.RegisterKeybind(this, "Spend 10 points", Microsoft.Xna.Framework.Input.Keys.LeftControl);
     SpendModTwentyFive = KeybindLoader.RegisterKeybind(this, "Spend 25 points", Microsoft.Xna.Framework.Input.Keys.LeftAlt);
 }
Exemplo n.º 2
0
        public override void Load()
        {
            Instance = this;
            string DiscordBuffTeleportation = Language.GetTextValue("Discord Buff Teleportation");

            DiscordBuff = KeybindLoader.RegisterKeybind(this, 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.º 3
0
        public override void Load()
        {
            finalizedRegisterCompat = false;
            mod = this;
            BossBuffImmunity = new HashSet <int>();
            AutoClickKey     = KeybindLoader.RegisterKeybind(this, "Clicker Accessory", "G");         //Can't localize this
            AimAssistKey     = KeybindLoader.RegisterKeybind(this, "Clicker Aim Assist", "Mouse3");   //Can't localize this
            ClickerSystem.Load();

            ClickEffect.LoadMiscEffects();
            NetHandler.Load();

            if (!Main.dedServ)
            {
                LoadClient();
            }
        }
Exemplo n.º 4
0
        public override void Load()
        {
            Instance = this;

            summonTracker   = new MutantSummonTracker();
            dialogueTracker = new DevianttDialogueTracker();
            dialogueTracker.AddVanillaDialogue();

            HomeKey   = KeybindLoader.RegisterKeybind(this, "Quick Recall/Mirror", "Home");
            RodKey    = KeybindLoader.RegisterKeybind(this, "Quick Rod of Discord", "E");
            CustomKey = KeybindLoader.RegisterKeybind(this, "Quick Use Custom (Bottom Left Inventory Slot)", "K");

            StatKey = KeybindLoader.RegisterKeybind(this, "Open Stat Sheet", "M");

            _userInterfaceManager = new UIManager();
            _userInterfaceManager.LoadUI();

            mods = new string[]
            {
                "FargowiltasSouls", // Fargo's Souls
                "FargowiltasSoulsDLC",
                "ThoriumMod",
                "CalamityMod"
            };

            ModLoaded = new Dictionary <string, bool>();
            foreach (string mod in mods)
            {
                ModLoaded.Add(mod, false);
            }

            AddToggle("Mods.Fargowiltas.Mutant", "Mutant Can Spawn", ModContent.ItemType <MutantMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Abom", "Abominationn Can Spawn", ModContent.ItemType <AbominationnMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Devi", "Deviantt Can Spawn", ModContent.ItemType <DevianttMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Lumber", "Lumberjack Can Spawn", ModContent.ItemType <LumberjackMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Squirrel", "Squirrel Can Spawn", ItemID.TopHat, "ffffff");

            CaughtNPCItem.RegisterItems(this);

            // DD2 Banner Effect hack
            ItemID.Sets.BannerStrength = ItemID.Sets.Factory.CreateCustomSet(new ItemID.BannerEffect(1f));
        }
Exemplo n.º 5
0
 public override void Load()
 {
     ToggleCursorHotKey = KeybindLoader.RegisterKeybind(Mod, "Toggle Boss Cursor", "B");
 }
Exemplo n.º 6
0
 public override void Load()
 {
     ToggleTooltipsHotkey = KeybindLoader.RegisterKeybind(this, "Tile/NPC Mod Tooltip", "OemQuestion");
     TechnicalNamesHotkey = KeybindLoader.RegisterKeybind(this, "Technical Names", "N");
 }
Exemplo n.º 7
0
        public override void Load()
        {
            PartySelectHotkey = KeybindLoader.RegisterKeybind(this, "Party menu", "F");
            GuardHotKey       = KeybindLoader.RegisterKeybind(this, "Guard", "Q");
            MusicUpKey        = KeybindLoader.RegisterKeybind(this, "MusicalUp", "Z");
            MusicLeftKey      = KeybindLoader.RegisterKeybind(this, "MusicalLeft", "X");
            MusicDownKey      = KeybindLoader.RegisterKeybind(this, "MusicalDown", "N");
            MusicRightKey     = KeybindLoader.RegisterKeybind(this, "MusicalRight", "M");

            instance = this;

            CommandLogic.Initialize();
            CommandLogic.instance.ChangeCommand(0);

            Logger.InfoFormat("{0} Sora logging", Name);

            if (!Main.dedServ)
            {
                orgCoatSlots    = new int[3];
                orgCoatSlots[0] = AddEquipTexture(new Items.Armor.orgCoat(), EquipType.Body, "KingdomTerrahearts/Items/Armor/orgCoat_Body");
                orgCoatSlots[1] = AddEquipTexture(new Items.Armor.orgCoat(), EquipType.Legs, "KingdomTerrahearts/Items/Armor/orgCoat_Legs");
                orgCoatSlots[2] = AddEquipTexture(new Items.Armor.orgCoat(), EquipType.Head, "KingdomTerrahearts/Items/Armor/orgCoat_Head");



                MusicLoader.AddMusicBox(this,
                                        MusicLoader.GetMusicSlot(this, "Sounds/Music/Lazy Afternoons"), ModContent.ItemType <Items.Placeable.LazyAfternoons_Item>(), ModContent.TileType <Tiles.MusicBoxes.LazyAfternoons_MusicBox>());

                MusicLoader.AddMusicBox(this,
                                        MusicLoader.GetMusicSlot(this, "Sounds/Music/Vector to the Heaven"), ModContent.ItemType <Items.Placeable.VectorToHeaven_Item>(), ModContent.TileType <Tiles.MusicBoxes.VectorToHeaven_MusicBox>());
            }

            if (Main.netMode != NetmodeID.Server)
            {
                // First, you load in your shader file.
                // You'll have to do this regardless of what kind of shader it is,
                // and you'll have to do it for every shader file.
                // This example assumes you have both armour and screen shaders.

                Ref <Effect> dyeRef = new Ref <Effect>(ModContent.Request <Effect>("KingdomTerrahearts/Effects/lastWorldShader").Value);

                // To add a dye, simply add this for every dye you want to add.
                // "PassName" should correspond to the name of your pass within the *technique*,
                // so if you get an error here, make sure you've spelled it right across your effect file.

                GameShaders.Armor.BindShader(ModContent.ItemType <Items.lastWorldDye>(), new ArmorShaderData(dyeRef, "ArmorMyShader"));

                Ref <Effect> screenRef = new Ref <Effect>(ModContent.Request <Effect>("KingdomTerrahearts/Effects/Shockwave").Value);              // The path to the compiled shader file.
                Filters.Scene["Shockwave"] = new Filter(new ScreenShaderData(screenRef, "Shockwave"), EffectPriority.VeryHigh);
                Filters.Scene["Shockwave"].Load();
            }

            if (!Main.dedServ)
            {
                partyInterface = new UserInterface();
                partyUI        = new PartyUI();
                partyUI.Activate();

                commandInterface = new UserInterface();
                commandUI        = new CommandMenu();
                commandUI.Activate();

                dialogInterface = new UserInterface();
                dialogUI        = new DialogDisplay();
                dialogUI.Activate();

                levelUpInterface = new UserInterface();
                levelUpUI        = new KeybladeLeveling();
                levelUpUI.Activate();
            }


            //Collision extra

            On.Terraria.Player.Update_NPCCollision += CollisionDetour;
        }
        // public CombatHotkeysMod()
        // {
        //  Properties/* tModPorter Note: Removed. Instead, assign the properties directly (ContentAutoloadingEnabled, GoreAutoloadingEnabled, MusicAutoloadingEnabled, and BackgroundAutoloadingEnabled) */ = new ModProperties()
        //  {
        //      Autoload = true,
        //      AutoloadGores = true,
        //      AutoloadSounds = true
        //  };
        // }

        public override void Load()
        {
            base.Load();
            HotKeys = SlotDefs.Select((slot, index) => KeybindLoader.RegisterKeybind(this, $"Quick Use Slot {slot + 1}", _slotDefaultKeys[index])).ToArray();
        }