// Token: 0x06000192 RID: 402 RVA: 0x0000CD0C File Offset: 0x0000AF0C
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Rhythminator", "rhythminator");

            Game.Items.Rename("outdated_gun_mods:rhythminator", "bb:rhythminator");
            gun.gameObject.AddComponent <Rhythminator>();
            GunExt.SetShortDescription(gun, "Keeping The Beat");
            GunExt.SetLongDescription(gun, "A strange gun that seems to pulse at a steady rate. As you hold the gun, the pulse finds its way into your every move...\n\nLet's dance.");
            GunExt.SetupSprite(gun, null, "rhythminator_idle_001", 10);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 10);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(577) as Gun, true, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 4f;
            gun.DefaultModule.cooldownTime        = 0.133333f;
            gun.DefaultModule.numberOfShotsInClip = 25;
            gun.barrelOffset.position            += new Vector3(1f, 0f, 0f);
            gun.SetBaseMaxAmmo(500);
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "72687974686d";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.AdditionalScaleMultiplier = 1.5f;
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 0.667f;
            projectile.baseData.speed       *= 1.33333f;
            projectile.transform.parent      = gun.barrelOffset;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            MultiActiveReloadController multiActiveReloadController = gun.gameObject.AddComponent <MultiActiveReloadController>();

            multiActiveReloadController.activeReloadEnabled = true;
            multiActiveReloadController.reloads             = new List <MultiActiveReloadData>
            {
                new MultiActiveReloadData(0.37f, 36, 38, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 1.75f
                }, true),
                new MultiActiveReloadData(0.5f, 49, 51, 5, 9, false, true, new ActiveReloadData
                {
                    damageMultiply = 2f
                }, true),
                new MultiActiveReloadData(0.62f, 61, 63, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 2.25f
                }, true),
                new MultiActiveReloadData(0.75f, 74, 76, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 2.5f
                }, true),
                new MultiActiveReloadData(0.87f, 86, 88, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 2.75f
                }, true)
            };
        }
        public override void InheritData(Gun source)
        {
            base.InheritData(source);
            MultiActiveReloadController component = source.GetComponent <MultiActiveReloadController>();

            if (component)
            {
                this.reloads             = component.reloads;
                this.activeReloadEnabled = component.activeReloadEnabled;
            }
        }
 public static void OnActiveReloadPressedHook(Action <Gun, PlayerController, Gun, bool> orig, Gun self, PlayerController p, Gun g, bool actualPress)
 {
     orig(self, p, g, actualPress);
     if (self.IsReloading || self.reloadTime < 0f)
     {
         PlayerController playerController = self.CurrentOwner as PlayerController;
         if (playerController && (actualPress || true))
         {
             MultiActiveReloadController controller = self.GetComponent <MultiActiveReloadController>();
             if (controller != null && controller.activeReloadEnabled && controller.canAttemptActiveReload && !GameUIRoot.Instance.GetReloadBarForPlayer(self.CurrentOwner as PlayerController).IsActiveReloadGracePeriod())
             {
                 bool flag2 = GameUIRoot.Instance.AttemptActiveReloadOnlyMultireload(self.CurrentOwner as PlayerController);
                 MultiActiveReload reload = GameUIRoot.Instance.GetReloadBarForPlayer(self.CurrentOwner as PlayerController).GetMultiActiveReloadForController();
                 if (flag2)
                 {
                     controller.OnActiveReloadSuccess(reload);
                     GunFormeSynergyProcessor component = self.GetComponent <GunFormeSynergyProcessor>();
                     if (component)
                     {
                         component.JustActiveReloaded = true;
                     }
                     ChamberGunProcessor component2 = self.GetComponent <ChamberGunProcessor>();
                     if (component2)
                     {
                         component2.JustActiveReloaded = true;
                     }
                 }
                 else
                 {
                     controller.OnActiveReloadFailure(reload);
                 }
                 if (reload == null || !reload.canAttemptActiveReloadAfterwards)
                 {
                     ETGModConsole.Log("yes");
                     controller.canAttemptActiveReload = false;
                     Action <PlayerController, Gun, bool> act = (Action <PlayerController, Gun, bool>)info2.CreateDelegate <Action <PlayerController, Gun, bool> >();
                     self.OnReloadPressed -= act;
                 }
             }
         }
     }
 }