public WeaponData(WeaponPresets preset, float weaponScalingFactor = 1) { SetRandomWeaponType(); switch (preset) { case WeaponPresets.randomScaledPlayer: { UpgradesInstalled = new List <UpgradeData>() { new UpgradeData(UpgradeData.ModType.trajectoryMod, UpgradeData.ModStatus.locked) }; float tempWeaponWeight = 0; if (weaponScalingFactor > 3) { if (Random.Range(0, 3) == 1) { UpgradesInstalled.Add(new UpgradeData(UpgradeData.ModType.splitMod, UpgradeData.ModStatus.normal)); tempWeaponWeight += 1.25f; } } while (tempWeaponWeight < weaponScalingFactor) { UpgradesInstalled.Add(new UpgradeData(UpgradeData.GetRandomEffectModifier(), UpgradeData.ModStatus.normal)); tempWeaponWeight += Random.Range(0.35f, 0.65f); } weapon_bounces = 0; weapon_speedScale = 2; break; } case WeaponPresets.randomScaledEnemy: { UpgradesInstalled = new List <UpgradeData>() { new UpgradeData(UpgradeData.ModType.trajectoryMod, UpgradeData.ModStatus.normal) }; float tempWeaponWeight = 0; while (tempWeaponWeight < weaponScalingFactor) { UpgradesInstalled.Add(new UpgradeData(UpgradeData.GetRandomEffectModifier(), UpgradeData.ModStatus.normal)); tempWeaponWeight += Random.Range(0.45f, 0.55f); } weapon_bounces = 0; weapon_speedScale = 0.75f + weaponScalingFactor * 0.2f; break; } case WeaponPresets.droneMinigun: { weapon_bounces = 0; weapon_speedScale = 3; break; } } UpdateWeaponModReading(); }