public void Awake()
        {
            modDetails = new FrogtownModDetails("com.frogtown.healinghelper")
            {
                description          = "Turns you into a healing drone when you die, instead of spectating.",
                githubAuthor         = "ToyDragon",
                githubRepo           = "ROR2ModHealingHelper",
                thunderstoreFullName = "ToyDragon-HealingHelpers"
            };
            FrogtownShared.RegisterMod(modDetails);

            On.RoR2.Stage.FixedUpdate += (orig, instance) =>
            {
                StageFixedUpdatePrefix(instance);
                orig(instance);
            };

            On.RoR2.CharacterMaster.OnBodyDeath += (orig, instance) =>
            {
                orig(instance);
                CharacterMasterOnBodyDeathPostfix(instance);
            };

            On.RoR2.Run.Start += (orig, instance) =>
            {
                orig(instance);
                RunStartPostfix();
            };

            On.RoR2.Stage.RespawnCharacter += (orig, instance, characterMaster) =>
            {
                StageRespawnCharacterPrefix(characterMaster);
                orig(instance, characterMaster);
            };
        }
        public void Awake()
        {
            modDetails = new FrogtownModDetails("com.frogtown.chatcheats")
            {
                description          = "Adds the /change_char and /give_item chat commands.",
                githubAuthor         = "ToyDragon",
                githubRepo           = "ROR2ModChatCommandCheats",
                thunderstoreFullName = "ToyDragon-CheatingChatCommands",
                OnGUI = OnSettingsGUI
            };
            FrogtownShared.RegisterMod(modDetails);

            FrogtownShared.AddChatCommand("change_char", OnCharCommand);
            FrogtownShared.AddChatCommand("give_item", OnGiveCommand);
            FrogtownShared.AddChatCommand("remove_item", OnRemoveCommand);
            FrogtownShared.AddChatCommand("clear_items", OnClearItemsCommand);

            itemsByTier = new List <ItemIndex>();
            foreach (var itemIndex in ItemCatalog.allItems)
            {
                itemsByTier.Add(itemIndex);
            }
            itemsByTier.Sort((a, b) =>
            {
                var definitionA = ItemCatalog.GetItemDef(a);
                var definitionB = ItemCatalog.GetItemDef(b);
                return(definitionA.tier.CompareTo(definitionB.tier));
            });
        }
Example #3
0
        public void Awake()
        {
            modDetails = new FrogtownModDetails("com.frogtown.characterrandomizer")
            {
                description          = "Switches the characters of everyone in the party randomly every stage.",
                githubAuthor         = "ToyDragon",
                githubRepo           = "ROR2ModCharacterRandomizer",
                thunderstoreFullName = "ToyDragon-CharacterRandomizer",
            };
            FrogtownShared.RegisterMod(modDetails);

            On.RoR2.Stage.RespawnCharacter += (orig, instance, characterMaster) =>
            {
                StageRespawnCharacterPrefix(characterMaster);
                orig(instance, characterMaster);
            };
        }
Example #4
0
        public void Awake()
        {
            modDetails = new FrogtownModDetails("com.frogtown.engineerfixes")
            {
                description          = "Allows turret kills to drop lunar coins, and turret damage count in score card.",
                githubAuthor         = "ToyDragon",
                githubRepo           = "ROR2ModEngineerLunarCoinFix",
                thunderstoreFullName = "ToyDragon-EngineerLunarCoinsFix",
            };
            modDetails.OnlyContainsBugFixesOrUIChangesThatArentContriversial();
            FrogtownShared.RegisterMod(modDetails);

            On.RoR2.HealthComponent.TakeDamage += (orig, instance, damageInfo) =>
            {
                HealthComponentTakeDamagePrefix(damageInfo);
                orig(instance, damageInfo);
                HealthComponentTakeDamagePostfix(damageInfo);
            };
        }