changeset 198:c4cf4c7db7d5

* Line ending fix no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sat, 31 Oct 2009 20:55:19 +0000
parents ec1cfe3ef94e
children 70ba3bee0c2e
files api/Factories/Xml/WarFoundryXmlRaceFactory.cs
diffstat 1 files changed, 44 insertions(+), 44 deletions(-) [+]
line diff
     1.1 --- a/api/Factories/Xml/WarFoundryXmlRaceFactory.cs	Fri Oct 30 21:02:48 2009 +0000
     1.2 +++ b/api/Factories/Xml/WarFoundryXmlRaceFactory.cs	Sat Oct 31 20:55:19 2009 +0000
     1.3 @@ -182,30 +182,30 @@
     1.4  		
     1.5  		private static AbstractLimit GetLimitFromElement(XmlElement limitElem)
     1.6  		{
     1.7 -			AbstractLimit limit = null;
     1.8 -
     1.9 -			if (limitElem != null)
    1.10 -			{
    1.11 -				switch (limitElem.LocalName)
    1.12 -				{
    1.13 -					case "percentageLimit":
    1.14 -						double limitPercent = XmlTools.GetDoubleValueFromAttribute(limitElem, "limit");
    1.15 -						bool roundUp = limitElem.GetAttribute("round").Equals("up");
    1.16 -						limit = new SimpleRoundedPercentageLimit(limitPercent, roundUp);
    1.17 -						break;
    1.18 -					case "sizeConstrainedLimit":
    1.19 -						limit = new NumericSizeConstrainedLimit(XmlTools.GetIntValueFromAttribute(limitElem, "limit"));
    1.20 -						break;
    1.21 -					case "absoluteLimit":
    1.22 -						limit = new AbsoluteNumericLimit(XmlTools.GetIntValueFromAttribute(limitElem, "limit"));
    1.23 -						break;
    1.24 -					case "unitSizeLimit":
    1.25 -						limit = new NumericSizeConstrainedLimit();
    1.26 -						break;
    1.27 -					default:
    1.28 -						//TODO: Warn of missing handler for when we've extended the limit list
    1.29 -						break;
    1.30 -				}
    1.31 +			AbstractLimit limit = null;
    1.32 +
    1.33 +			if (limitElem != null)
    1.34 +			{
    1.35 +				switch (limitElem.LocalName)
    1.36 +				{
    1.37 +					case "percentageLimit":
    1.38 +						double limitPercent = XmlTools.GetDoubleValueFromAttribute(limitElem, "limit");
    1.39 +						bool roundUp = limitElem.GetAttribute("round").Equals("up");
    1.40 +						limit = new SimpleRoundedPercentageLimit(limitPercent, roundUp);
    1.41 +						break;
    1.42 +					case "sizeConstrainedLimit":
    1.43 +						limit = new NumericSizeConstrainedLimit(XmlTools.GetIntValueFromAttribute(limitElem, "limit"));
    1.44 +						break;
    1.45 +					case "absoluteLimit":
    1.46 +						limit = new AbsoluteNumericLimit(XmlTools.GetIntValueFromAttribute(limitElem, "limit"));
    1.47 +						break;
    1.48 +					case "unitSizeLimit":
    1.49 +						limit = new NumericSizeConstrainedLimit();
    1.50 +						break;
    1.51 +					default:
    1.52 +						//TODO: Warn of missing handler for when we've extended the limit list
    1.53 +						break;
    1.54 +				}
    1.55  			}
    1.56  			
    1.57  			return limit;
    1.58 @@ -260,20 +260,20 @@
    1.59  						{
    1.60  							throw new InvalidFileException("Attribute 'equipmentSlot' of unit equipment item " + id + " for " + type.Name + " was not a valid slot name");
    1.61  						}
    1.62 -					}
    1.63 -
    1.64 -					AbstractLimit limit = GetMaxLimit(equip);
    1.65 -
    1.66 -					if (limit != null)
    1.67 -					{
    1.68 -						unitEquipItem.MaxLimit = limit;
    1.69 -					}
    1.70 -
    1.71 -					limit = GetMinLimit(equip);
    1.72 -
    1.73 -					if (limit != null)
    1.74 -					{
    1.75 -						unitEquipItem.MinLimit = limit;
    1.76 +					}
    1.77 +
    1.78 +					AbstractLimit limit = GetMaxLimit(equip);
    1.79 +
    1.80 +					if (limit != null)
    1.81 +					{
    1.82 +						unitEquipItem.MaxLimit = limit;
    1.83 +					}
    1.84 +
    1.85 +					limit = GetMinLimit(equip);
    1.86 +
    1.87 +					if (limit != null)
    1.88 +					{
    1.89 +						unitEquipItem.MinLimit = limit;
    1.90  					}
    1.91  					
    1.92  					unitEquipItem.RoundNumberUp = equip.GetAttribute("roundDirection").Equals("up");
    1.93 @@ -310,12 +310,12 @@
    1.94  					throw new InvalidFileException("Equipment item with ID '" + id + "' was required by " + type.Name + " but was not found");
    1.95  				}
    1.96  			}		
    1.97 -		}
    1.98 -
    1.99 -		private static AbstractLimit GetMinLimit(XmlElement elem)
   1.100 -		{
   1.101 -			XmlElement limitElem = WarFoundryXmlFactoryUtils.SelectSingleElement(elem, "race:minLimit/*[1]");
   1.102 -			return GetLimitFromElement(limitElem);
   1.103 +		}
   1.104 +
   1.105 +		private static AbstractLimit GetMinLimit(XmlElement elem)
   1.106 +		{
   1.107 +			XmlElement limitElem = WarFoundryXmlFactoryUtils.SelectSingleElement(elem, "race:minLimit/*[1]");
   1.108 +			return GetLimitFromElement(limitElem);
   1.109  		}
   1.110  		
   1.111  		private void LoadAbilitiesForUnitType(XmlElement elem, UnitType type)