void updateFieldsFromWeapon()
        {
            // attributes of the weapon
            maxAmmo.Text          = templateWeapon.getMaxAmmo().ToString();
            ammoRechargeRate.Text = templateWeapon.getAmmoRechargeRate().ToString();
            ammoPerBox.Text       = templateWeapon.getAmmoPerBox().ToString();
            warmupTime.Text       = templateWeapon.getWarmupTime().ToString();
            cooldownTime.Text     = templateWeapon.getCooldownTime().ToString();
#if SWITCH_TIMES
            switchToTime.Text   = templateWeapon.getSwitchToTime().ToString();
            switchFromTime.Text = templateWeapon.getSwitchFromTime().ToString();
#endif
            automatic.IsChecked             = templateWeapon.isAutomatic();
            stickyTrigger.IsChecked         = templateWeapon.isTriggerSticky();
            ownersVelocityScale.Text        = templateWeapon.getOwnersVelocityScale().ToString();
            fireWhileInactive.IsChecked     = templateWeapon.canFireWhileInactive();
            cooldownWhileInactive.IsChecked = templateWeapon.coolsDownWhileInactive();
            rechargeWhileInactive.IsChecked = templateWeapon.rechargesWhileInactive();

            // attributes of the projectile
            Projectile templateProjectile = templateWeapon.getTemplateProjectile();
            projectileX.Text            = templateProjectile.getCenter()[0].ToString();
            projectileY.Text            = templateProjectile.getCenter()[1].ToString();
            projectileVX.Text           = templateProjectile.getVelocity()[0].ToString();
            projectileVY.Text           = templateProjectile.getVelocity()[1].ToString();
            projectileDrag.Text         = templateProjectile.getDragCoefficient().ToString();
            projectileGravity.Text      = templateProjectile.getGravity().ToString();
            projectileImage.Text        = templateProjectile.getImage().Source.ToString();
            projectileRadius.Text       = ((templateProjectile.getShape().getWidth() + templateProjectile.getShape().getHeight()) / 4).ToString();
            remainingFlightTime.Text    = templateProjectile.getRemainingFlightTime().ToString();
            numExplosionsRemaining.Text = templateProjectile.getNumExplosionsRemaining().ToString();
            penetration.Text            = templateProjectile.getPenetration().ToString();
            homingAccel.Text            = templateProjectile.getHomingAccel().ToString();
            boomerangAccel.Text         = templateProjectile.getBoomerangAccel().ToString();
            homeOnProjectiles.IsChecked = templateProjectile.shouldHomeOnProjectiles();
            homeOnCharacters.IsChecked  = templateProjectile.shouldHomeOnCharacters();

            // attributes of the explosion
            Explosion templateExplosion = templateProjectile.getTemplateExplosion();
            explosionImage.Text    = templateExplosion.getImage().Source.ToString();
            explosionRadius.Text   = ((templateExplosion.getShape().getWidth() + templateExplosion.getShape().getHeight()) / 4).ToString();
            explosionDuration.Text = templateExplosion.getDuration().ToString();
            friendlyFire.IsChecked = templateExplosion.isFriendlyFireEnabled();
            knockBack.Text         = templateExplosion.getKnockbackAccel().ToString();

            // attributes of the stun
            Stun templateStun = templateExplosion.getTemplateStun();
            timeMultiplier.Text  = templateStun.getTimeMultiplier().ToString();
            damagePerSecond.Text = templateStun.getDamagePerSecond().ToString();
            ammoDrain.Text       = templateStun.getAmmoDrain().ToString();
            stunDuration.Text    = templateStun.getDuration().ToString();

            // now update anything else that might need it
            //this.calculateCost();
            this.weaponCost.Content = this.templateWeapon.getCost();
        }