Beispiel #1
0
        public void InitUpgradeMenu(e_Selector iWeapon)
        {
            iSavedWeapon = (int)iWeapon;
            switch (iWeapon)
            {
            case e_Selector.MEELE:
            {
                numericSlots.Value    = 0;
                numericDamage.Value   = mainForm.i_UPGRADE_MEELE_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_MEELE_RateOfFire;
                numericAmmo.Value     = 0;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = false; labelNoUpgrade.Visible = true;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = false;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 0";
                labelRate.Text        = "Maximum: 0";
                labelAmmo.Text        = "No effect";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.AXE:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_AXE_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_AXE_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_AXE_RateOfFire;
                numericAmmo.Value     = 0;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = false;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 0";
                labelAmmo.Text        = "No effect";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.PISTOL:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_PISTOL_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_PISTOL_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_PISTOL_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_PISTOL_Ammo;
                numericUnique.Value   = mainForm.i_UPGRADE_PISTOL_Unique;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = true;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "Maximum: 2";
                labelUnique.Text      = "Maximum: 2"; toolTipUniques.SetToolTip(linkLabel1, PistolUpgrades());
                break;
            }

            case e_Selector.BLASTER:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_BLASTER_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_BLASTER_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_BLASTER_RateOfFire;
                numericAmmo.Value     = 0;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = false;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 4";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "No effect";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.PYTHON:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_PYTHON_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_PYTHON_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_PYTHON_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_PYTHON_Ammo;
                numericUnique.Value   = mainForm.i_UPGRADE_PYTHON_Unique;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = true;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "Maximum: 0";
                labelUnique.Text      = "Maximum: 2"; toolTipUniques.SetToolTip(linkLabel1, PythonUpgrades());
                break;
            }

            case e_Selector.AKIMBO:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_AKIMBO_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_AKIMBO_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_AKIMBO_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_AKIMBO_Ammo;
                numericUnique.Value   = mainForm.i_UPGRADE_AKIMBO_Unique;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = true;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "Maximum: 5";
                labelUnique.Text      = "Maximum: 1"; toolTipUniques.SetToolTip(linkLabel1, AkimboUpgrades());
                break;
            }

            case e_Selector.SMG:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_SMG_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_SMG_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_SMG_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_SMG_Ammo;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "Maximum: 5";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.SHOTGUN:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_SHOTGUN_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_SHOTGUN_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_SHOTGUN_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_SHOTGUN_Ammo;
                numericUnique.Value   = mainForm.i_UPGRADE_SHOTGUN_Unique;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = true;
                labelDamage.Text      = "Maximum: 4";
                labelRate.Text        = "Maximum: 4";
                labelAmmo.Text        = "Maximum: 4";
                labelUnique.Text      = "Maximum: 1"; toolTipUniques.SetToolTip(linkLabel1, ShotgunUpgrades());
                break;
            }

            case e_Selector.CROSSBOW:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_CROSSBOW_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_CROSSBOW_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_CROSSBOW_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_CROSSBOW_Ammo;
                numericUnique.Value   = mainForm.i_UPGRADE_CROSSBOW_Unique;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = true;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "Maximum: 3";
                labelUnique.Text      = "Maximum: 2"; toolTipUniques.SetToolTip(linkLabel1, CrossbowUpgrades());
                break;
            }

            case e_Selector.ASSAULT:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_ASSAULT_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_ASSAULT_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_ASSAULT_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_ASSAULT_Ammo;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 4";
                labelAmmo.Text        = "Maximum: 5";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.SAW:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_SAW_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_SAW_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_SAW_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_SAW_Ammo;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "Maximum: 5";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.SNIPER:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_SNIPER_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_SNIPER_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_SNIPER_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_SNIPER_Ammo;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 2";
                labelAmmo.Text        = "Maximum: 5";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.ROCKET:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_RPG_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_RPG_Damage;
                numericRate.Value     = 0;
                numericAmmo.Value     = 0;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = false;
                numericAmmo.Enabled   = false;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "No effect";
                labelAmmo.Text        = "No effect";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.GAUSS:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_GAUSS_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_GAUSS_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_GAUSS_RateOfFire;
                numericAmmo.Value     = 0;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = false;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 5";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "No effect";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.SHOCK:
            {
                numericSlots.Value    = 0;
                numericDamage.Value   = 0;
                numericRate.Value     = mainForm.i_UPGRADE_SHOCK_RateOfFire;
                numericAmmo.Value     = 0;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = false; labelNoUpgrade.Visible = true;
                numericDamage.Enabled = false;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = false;
                numericUnique.Enabled = false;
                labelDamage.Text      = "No effect";
                labelRate.Text        = "Maximum: 0";
                labelAmmo.Text        = "No effect";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.GRENADE:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_GRENADE_Slots;
                numericDamage.Value   = 0;
                numericRate.Value     = mainForm.i_UPGRADE_GRENADE_RateOfFire;
                numericAmmo.Value     = mainForm.i_UPGRADE_GRENADE_Ammo;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = false;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = true;
                numericUnique.Enabled = false;
                labelDamage.Text      = "No effect";
                labelRate.Text        = "Maximum: 5";
                labelAmmo.Text        = "Maximum: 3";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }

            case e_Selector.MINIGUN:
            {
                numericSlots.Value    = mainForm.i_UPGRADE_MINIGUN_Slots;
                numericDamage.Value   = mainForm.i_UPGRADE_MINIGUN_Damage;
                numericRate.Value     = mainForm.i_UPGRADE_MINIGUN_RateOfFire;
                numericAmmo.Value     = 0;
                numericUnique.Value   = 0;
                numericSlots.Enabled  = true; labelNoUpgrade.Visible = false;
                numericDamage.Enabled = true;
                numericRate.Enabled   = true;
                numericAmmo.Enabled   = false;
                numericUnique.Enabled = false;
                labelDamage.Text      = "Maximum: 2";
                labelRate.Text        = "Maximum: 4";
                labelAmmo.Text        = "No effect";
                labelUnique.Text      = "No uniques"; toolTipUniques.SetToolTip(linkLabel1, "This weapon has no unique upgrades.");
                break;
            }
            }
        }
Beispiel #2
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            e_Selector iWeapon = (e_Selector)iSavedWeapon;

            switch (iWeapon)
            {
            case e_Selector.MEELE:
            {
                mainForm.i_UPGRADE_MEELE_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_MEELE_RateOfFire = (int)numericRate.Value;
                break;
            }

            case e_Selector.AXE:
            {
                mainForm.i_UPGRADE_AXE_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_AXE_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_AXE_RateOfFire = (int)numericRate.Value;
                break;
            }

            case e_Selector.PISTOL:
            {
                mainForm.i_UPGRADE_PISTOL_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_PISTOL_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_PISTOL_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_PISTOL_Ammo       = (int)numericAmmo.Value;
                mainForm.i_UPGRADE_PISTOL_Unique     = (int)numericUnique.Value;
                break;
            }

            case e_Selector.BLASTER:
            {
                mainForm.i_UPGRADE_BLASTER_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_BLASTER_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_BLASTER_RateOfFire = (int)numericRate.Value;
                break;
            }

            case e_Selector.PYTHON:
            {
                mainForm.i_UPGRADE_PYTHON_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_PYTHON_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_PYTHON_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_PYTHON_Ammo       = (int)numericAmmo.Value;
                mainForm.i_UPGRADE_PYTHON_Unique     = (int)numericUnique.Value;
                break;
            }

            case e_Selector.AKIMBO:
            {
                mainForm.i_UPGRADE_AKIMBO_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_AKIMBO_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_AKIMBO_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_AKIMBO_Ammo       = (int)numericAmmo.Value;
                mainForm.i_UPGRADE_AKIMBO_Unique     = (int)numericUnique.Value;
                break;
            }

            case e_Selector.SMG:
            {
                mainForm.i_UPGRADE_SMG_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_SMG_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_SMG_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_SMG_Ammo       = (int)numericAmmo.Value;
                break;
            }

            case e_Selector.SHOTGUN:
            {
                mainForm.i_UPGRADE_SHOTGUN_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_SHOTGUN_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_SHOTGUN_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_SHOTGUN_Ammo       = (int)numericAmmo.Value;
                mainForm.i_UPGRADE_SHOTGUN_Unique     = (int)numericUnique.Value;
                break;
            }

            case e_Selector.CROSSBOW:
            {
                mainForm.i_UPGRADE_CROSSBOW_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_CROSSBOW_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_CROSSBOW_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_CROSSBOW_Ammo       = (int)numericAmmo.Value;
                mainForm.i_UPGRADE_CROSSBOW_Unique     = (int)numericUnique.Value;
                break;
            }

            case e_Selector.ASSAULT:
            {
                mainForm.i_UPGRADE_ASSAULT_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_ASSAULT_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_ASSAULT_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_ASSAULT_Ammo       = (int)numericAmmo.Value;
                break;
            }

            case e_Selector.SAW:
            {
                mainForm.i_UPGRADE_SAW_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_SAW_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_SAW_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_SAW_Ammo       = (int)numericAmmo.Value;
                break;
            }

            case e_Selector.SNIPER:
            {
                mainForm.i_UPGRADE_SNIPER_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_SNIPER_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_SNIPER_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_SNIPER_Ammo       = (int)numericAmmo.Value;
                break;
            }

            case e_Selector.ROCKET:
            {
                mainForm.i_UPGRADE_RPG_Slots  = (int)numericSlots.Value;
                mainForm.i_UPGRADE_RPG_Damage = (int)numericDamage.Value;
                break;
            }

            case e_Selector.GAUSS:
            {
                mainForm.i_UPGRADE_GAUSS_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_GAUSS_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_GAUSS_RateOfFire = (int)numericRate.Value;
                break;
            }

            case e_Selector.SHOCK:
            {
                mainForm.i_UPGRADE_SHOCK_RateOfFire = (int)numericRate.Value;
                break;
            }

            case e_Selector.GRENADE:
            {
                mainForm.i_UPGRADE_GRENADE_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_GRENADE_RateOfFire = (int)numericRate.Value;
                mainForm.i_UPGRADE_GRENADE_Ammo       = (int)numericAmmo.Value;
                break;
            }

            case e_Selector.MINIGUN:
            {
                mainForm.i_UPGRADE_MINIGUN_Slots      = (int)numericSlots.Value;
                mainForm.i_UPGRADE_MINIGUN_Damage     = (int)numericDamage.Value;
                mainForm.i_UPGRADE_MINIGUN_RateOfFire = (int)numericRate.Value;
                break;
            }
            }

            Close();
        }