Exemplo n.º 1
0
        void ParseSettingElement(XElement settingElement, SettingTypes settingType)
        {
            //Create the value generator.
            ValueGenerator valueGenerator = CreateValueGenerator(settingElement, SchemeLimits.GetSettingLimits(settingType));

            //Pass the new value generator to the scheme generator.
            Debug.Assert(_schemeGenerator != null);

            _schemeGenerator.Set(settingType, valueGenerator);
        }
Exemplo n.º 2
0
 void ParseExtendedOptionElement(XElement extendedOptionElement, ExtendedOptionTypes extendedOptionType)
 {
     if ((int)extendedOptionType <= SchemeTypes.GetExtendedOptionsSettingsCount(_schemeGenerator.ExtendedOptionsDataVersion))
     {
         ValueGenerator valueGenerator = CreateValueGenerator(extendedOptionElement, SchemeLimits.GetExtendedOptionLimits(extendedOptionType));
         _schemeGenerator.Set(extendedOptionType, valueGenerator);
     }
     else
     {
         _errorCollection.AddExtendedOptionNotAvailable(extendedOptionElement, extendedOptionType, _schemeGenerator.ExtendedOptionsDataVersion);
     }
 }
Exemplo n.º 3
0
        void ParseWeaponSettingElement(XElement weaponSettingElement, WeaponTypes weaponType, WeaponSettings weaponSetting)
        {
            //Create the value generator.
            ValueGenerator valueGenerator = CreateValueGenerator(weaponSettingElement, SchemeLimits.GetWeaponSettingLimits(weaponType, weaponSetting));

            //Pass the new value generator to the scheme generator.
            Debug.Assert(_schemeGenerator != null);

            if (weaponType != WeaponTypes.Default)
            {
                _schemeGenerator.Set(weaponType, weaponSetting, valueGenerator);
            }
            else
            {
                _schemeGenerator.SetDefault(weaponSetting, valueGenerator);
            }
        }