示例#1
0
        protected sealed override void Init()
        {
            logSource = base.logger;
            Log.Message("Sniper initializing");
            instance = this;


            base.awake += () =>
            {
                SetModdedModule.SetModded();
                ReinCore.AddModHash(guid, Properties.Info.ver, useBuild, useRev, networkVer);
                ConfigModule.CreateAndLoadConfig(this);

                Properties.Tools.RegisterLanguageTokens();
                SoundModule.LoadBank();
                NetworkModule.SetupNetworking();

                Default <Sprite> .value = UIModule.GetUnfinishedIcon();
                UIModule.EditHudPrefab();

                PrefabModule.CreatePrefab();
                DisplayModule.CreateDisplayPrefab();

                CatalogModule.RegisterBody();
                CatalogModule.RegisterSurvivor();
                CatalogModule.RegisterDoTType();
                CatalogModule.RegisterDamageTypes();
                CatalogModule.RegisterBuffTypes();
                CatalogModule.RegisterOrbs();
                CatalogModule.RegisterOverlays();

                VFXModule.Init();

                //UnlocksCore.AddUnlockable<WIPUnlockable>(false);
            };

            base.start += () =>
            {
                //MetaCatalog.LogCatalogState();

                try
                {
                    RoR2.Console.instance.SubmitCmd(null, "spp_disable_survivor Sniper");
                } catch { }
                _ = TextureModule.GetExplosiveAmmoRamp();
                _ = TextureModule.GetPlasmaAmmoRamp();
                _ = TextureModule.GetStandardAmmoRamp();
                _ = TextureModule.GetShockAmmoRamp();
                _ = TextureModule.GetScatterAmmoRamp();
            };

            base.enable      += HooksModule.Add;
            base.disable     += HooksModule.Remove;
            base.fixedUpdate += () => dt = Time.fixedDeltaTime;
            Log.Message("Sniper loaded successfully");
        }
示例#2
0
        private Main()
        {
            instance = this;
            ReinCore.AddModHash(guid, version, useBuild, useRev, networkVersion);
#if PROFILER
            this.Profiler();
#endif
            var durabilityPresent = false;
            try
            {
                durabilityPresent = BepInEx.Bootstrap.Chainloader.PluginInfos.Any((kv) => kv.Value.Metadata.GUID == "com.jarlyk.durability");
            } catch { }



            this.BalanceCommandoCDs(); //
            this.BalanceCorpsebloom(); //
            this.BalanceOSP();         //
            if (durabilityPresent)
            {
                LogM("Equipment durability found, deferring to that for gesture changes");
            }
            else
            {
                this.BalanceGesture();       //
            }
            this.BalanceConvergence();       //
            this.BalanceWillOWisp();         //
            //this.BalanceEngiTurrets();
            this.BalanceGame();              //
            this.BalanceElites();            //
            this.BalanceCaptain();           //
            this.BalanceRazorWire();         //

            this.HappyThings();              //

            this.FixBandolier();             //
            this.FixSelfDamage();            //
            this.FixDoTs();                  //
            this.FixHuntressFlurry();        //

            this.QoLVisionsCrosshair();      //
            this.QoLEngiTurretInheritance(); //
            this.QoLHuntressTracking();      //
            this.QoLEclipse();               //

            RoR2.RoR2Application.isModded = true;
            this.Tick += () => RoR2.RoR2Application.isModded = true;

            //new StatsAPI().Init();

#if DPSMETER
            this.SetupDPSMeter();
#endif
        }