Example #1
0
 private void FireMegaTurret_OnEnter(On.EntityStates.Drone.DroneWeapon.FireMegaTurret.orig_OnEnter orig, EntityStates.BaseState self)
 {
     //sets the force of the minigun lower
     typeof(RoR2.Console).Assembly.GetType("EntityStates.Drone.DroneWeapon.FireMegaTurret").GetField("force", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public).SetValue(self, 0.1f);
     orig(self);
     //desubcribe itself from the On.
     On.EntityStates.Drone.DroneWeapon.FireMegaTurret.OnEnter -= FireMegaTurret_OnEnter;
 }
Example #2
0
 private void FireGatling_OnEnter(On.EntityStates.Drone.DroneWeapon.FireGatling.orig_OnEnter orig, EntityStates.BaseState self)
 {
     orig(self);
 }
 private void FireMegaTurret_OnEnter(On.EntityStates.Drone.DroneWeapon.FireMegaTurret.orig_OnEnter orig, EntityStates.BaseState self)
 {
     if (!didReflect)
     {
         typeof(RoR2.Console).Assembly.GetType("EntityStates.Drone.DroneWeapon.FireMegaTurret").GetField("force", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public).SetValue(self, 0.1f);
         didReflect = true;
     }
     orig(self);
 }
Example #4
0
 private void FireMegaTurret_OnEnter(On.EntityStates.Drone.DroneWeapon.FireMegaTurret.orig_OnEnter orig, EntityStates.BaseState self)
 {
     orig(self);
 }
Example #5
0
 private void FireMissileBarrage_OnEnter(On.EntityStates.Drone.DroneWeapon.FireMissileBarrage.orig_OnEnter orig, EntityStates.BaseState self)
 {
     orig(self);
 }
Example #6
0
        void FireBolt_OnEnter(On.EntityStates.Mage.Weapon.FireBolt.orig_OnEnter orig, EntityStates.BaseState self)
        {
            //plays the eventid on the gameobject of the character when it does the firebolt attack (normally only artificer)
            var id = AkSoundEngine.PostEvent(eventid, self.outer.commonComponents.characterBody.coreTransform.gameObject);

            orig(self);
            //you can use the id later to stop the sound while it is still playing
            //AkSoundEngine.StopPlayingID(id);
        }
        private void TeleporterInteraction_ChargedState_OnEnter(On.RoR2.TeleporterInteraction.ChargedState.orig_OnEnter orig, EntityStates.BaseState self)
        {
            orig(self);

            if (PluginConfig.BlockTimedRespawnOnTPEvent.Value)
            {
                respawnController.UnblockTimedRespawn();
            }

            if (PluginConfig.RespawnOnTPEnd.Value)
            {
                respawnController.RespawnAllUsers();
            }
        }
        private void TeleporterInteraction_ChargingState_OnEnter(On.RoR2.TeleporterInteraction.ChargingState.orig_OnEnter orig, EntityStates.BaseState self)
        {
            orig(self);

            respawnController.RespawnType = RespawnType.Teleporter;

            if (PluginConfig.RespawnOnTPStart.Value)
            {
                respawnController.RespawnAllUsers();
            }

            if (PluginConfig.BlockTimedRespawnOnTPEvent.Value)
            {
                respawnController.BlockTimedRespawn();
                ChatHelper.RespawnBlockedOnTPEvent();
            }
        }