Ejemplo n.º 1
0
        private void PaladinPlugin_Load()
        {
            instance = this;

            // load assets and read config
            Modules.Assets.PopulateAssets();
            Modules.Config.ReadConfig();

            // modded item displays
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.KomradeSpectre.Aetherium"))
            {
                aetheriumInstalled = true;
            }
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.Sivelos.SivsItems"))
            {
                sivsItemsInstalled = true;
            }
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.K1454.SupplyDrop"))
            {
                supplyDropInstalled = true;
            }

            Modules.Prefabs.CreatePrefabs();                 // create body and display prefabs
            characterPrefab = Modules.Prefabs.paladinPrefab; // cache this for other mods to use it
            Modules.ItemDisplays.RegisterDisplays();         // add item displays(pain)
            Modules.States.RegisterStates();                 // register states
            Modules.Skills.SetupSkills(Modules.Prefabs.paladinPrefab);
            Modules.Skills.SetupSkills(Modules.Prefabs.lunarKnightPrefab);
            Modules.Survivors.RegisterSurvivors();     // register them into the body catalog
            Modules.Skins.RegisterSkins();             // add skins
            Modules.Buffs.RegisterBuffs();             // add and register custom buffs
            Modules.Projectiles.RegisterProjectiles(); // add and register custom projectiles
            Modules.Effects.RegisterEffects();         // add and register custom effects
            Modules.Unlockables.RegisterUnlockables(); // add unlockables
            Modules.Tokens.AddTokens();                // register name tokens

            CreateDoppelganger();                      // artifact of vengeance

            //scepter upgrades
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.ClassicItems"))
            {
                ScepterSkillSetup();
                ScepterSetup();
            }

            Hook();
        }
Ejemplo n.º 2
0
        public void Awake()
        {
            instance = this;

            // load assets and read config
            Modules.Assets.PopulateAssets();
            Modules.Config.ReadConfig();
            Modules.CameraParams.InitializeParams(); // create camera params for our character to use

            // modded item displays
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.KomradeSpectre.Aetherium"))
            {
                aetheriumInstalled = true;
            }
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.Sivelos.SivsItems"))
            {
                sivsItemsInstalled = true;
            }
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.K1454.SupplyDrop"))
            {
                supplyDropInstalled = true;
            }

            // ss2
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm.Starstorm2"))
            {
                starstormInstalled = true;
                claySkinIndex++;
            }

            Modules.Unlockables.RegisterUnlockables();       // add unlockables
            Modules.States.RegisterStates();                 // register states

            Modules.Prefabs.CreatePrefabs();                 // create body and display prefabs
            characterPrefab = Modules.Prefabs.paladinPrefab; // cache this for other mods to use it
            Modules.ItemDisplays.InitializeItemDisplays();   // add item displays(pain)
            Modules.Skills.SetupSkills(Modules.Prefabs.paladinPrefab);
            Modules.Skills.SetupSkills(Modules.Prefabs.lunarKnightPrefab);
            //Modules.Skills.SetupSkills(Modules.Prefabs.nemPaladinPrefab);
            Modules.Survivors.RegisterSurvivors();     // register them into the body catalog
            Modules.Buffs.RegisterBuffs();             // add and register custom buffs
            Modules.Projectiles.RegisterProjectiles(); // add and register custom projectiles
            Modules.Skins.RegisterSkins();             // add skins
            Modules.Effects.RegisterEffects();         // add and register custom effects
            Modules.Tokens.AddTokens();                // register name tokens

            CreateDoppelganger();                      // artifact of vengeance

            //scepter upgrades
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"))
            {
                ancientScepterInstalled = true;
                ScepterSkillSetup();
                ScepterSetup();
            }

            new Modules.ContentPacks().Initialize();

            Hook();
            RoR2.ContentManagement.ContentManager.onContentPacksAssigned += LateSetup;
            On.RoR2.EntityStateCatalog.Init += EntityStateCatalog_Init;
        }