예제 #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");
        }