Ejemplo n.º 1
0
        private void Run_Awake(On.RoR2.Run.orig_Awake orig, Run self)
        {
            orig.Invoke(self);

            //Readd the hook
            On.RoR2.Run.Update += Run_Update;
        }
Ejemplo n.º 2
0
        private void Run_Awake(On.RoR2.Run.orig_Awake orig, Run self)
        {
            CleanUpLeftovers();
            orig.Invoke(self);

            //Dont know wheter or not I am allow to hook everything down here but hey
            if (!RoR2Application.isInSinglePlayer)
            {
                Chat.AddMessage("<color=blue>Command Artifact NOT Loaded</color>");
                Chat.AddMessage("Command Artifact is currently not supported in multiplayer. Hope you still enjoy it tho ♥");
                On.EntityStates.Barrel.Opening.OnEnter         -= Opening_OnEnter;
                On.RoR2.PurchaseInteraction.OnInteractionBegin -= PurchaseInteraction_OnInteractionBegin;
                On.RoR2.Run.Update -= Run_Update;
                hooked              = false;
                return;
            }
            else
            {
                if (!hooked)
                {
                    On.EntityStates.Barrel.Opening.OnEnter         += Opening_OnEnter;
                    On.RoR2.PurchaseInteraction.OnInteractionBegin += PurchaseInteraction_OnInteractionBegin;
                    On.RoR2.Run.Update += Run_Update;
                    hooked              = true;
                }
            }



            //SetGlobalTimeScaleV2(config.TimeScaleDefault);
            Chat.AddMessage("<color=blue>Command Artifact Loaded</color>");
            init = false;
        }
Ejemplo n.º 3
0
        private void Run_Awake(On.RoR2.Run.orig_Awake orig, RoR2.Run self)
        {
            orig(self);

            deathTimerController.SetActive(true);

            if (NetworkServer.active)
            {
                usersRespawnController = base.gameObject.AddComponent <UsersRespawnController>();
                NetworkServer.Spawn(deathTimerController);
            }
        }
Ejemplo n.º 4
0
        private void Run_Awake(On.RoR2.Run.orig_Awake orig, Run self)
        {
            orig(self);
            FSVNetworkSync f = self.gameObject.AddComponent <FSVNetworkSync>();

            if (NetworkServer.active)
            {
                f.rootJungleTreasureChests      = RootJungleTreasureChests.Value;
                f.rootJungleTunnelLandmass      = RootJungleTunnelLandmass.Value;
                f.rootJungleHeldRocks           = RootJungleHeldRocks.Value;
                f.rootJungleUndergroundShortcut = RootJungleUndergroundShortcut.Value;
            }
        }
Ejemplo n.º 5
0
        private void Run_Awake(On.RoR2.Run.orig_Awake orig, RoR2.Run self)
        {
            orig.Invoke(self);

            RoR2.Chat.AddMessage("<color=blue>Command Artifact Loaded</color>");

            //Unhook non host related stuff
            //Had issues when everyone hooked them ...
            On.EntityStates.Barrel.Opening.OnEnter         -= Opening_OnEnter;
            On.RoR2.PurchaseInteraction.OnInteractionBegin -= PurchaseInteraction_OnInteractionBegin;
            //Makes sure the Update Function is hooked at the start!
            On.RoR2.Run.Update += Run_Update;
        }
Ejemplo n.º 6
0
        private void NewGame(On.RoR2.Run.orig_Awake orig, Run self)
        {
            CurrentWave = 0;

            orig(self);
        }
Ejemplo n.º 7
0
        private void Run_Awake(On.RoR2.Run.orig_Awake orig, Run self)
        {
            orig(self);

            var sinker = self.gameObject.AddComponent <SyncStageChanges>();
        }