diff api/Objects/Unit.cs @ 85:46ad6f478203

Re #50: Complete core loading of WarFoundry XML files * Start loading of UnitEquipmentItems * Fix XPath queries for equipment items and abilities * Allow UnitEquipmentItem to be created without a UnitType * Make adding UnitEquipmentItem to UnitType set UnitType of UnitEquipmentItem * Make loading of abilities and equipment items add the item to the race Also: * Code cleanup (line endings) * Make method to get equipment by ID return null instead of throwing "no such key" exception
author IBBoard <dev@ibboard.co.uk>
date Sat, 01 Aug 2009 16:06:25 +0000
parents 89cc29b4c012
children 110a7b0bcab5
line wrap: on
line diff
--- a/api/Objects/Unit.cs	Sun Jul 05 09:50:40 2009 +0000
+++ b/api/Objects/Unit.cs	Sat Aug 01 16:06:25 2009 +0000
@@ -24,12 +24,12 @@
 		private List<Unit> containedUnits = new List<Unit>();
 		public event DoubleValChangedDelegate PointsValueChanged;
 		public event IntValChangedDelegate UnitSizeChanged;
-		public event DoubleValChangedDelegate UnitEquipmentAmountChanged;
-
-		public Unit(UnitType unitType, ArmyCategory parentArmyCat) : this(unitType, unitType.MinSize, parentArmyCat) { }
-
+		public event DoubleValChangedDelegate UnitEquipmentAmountChanged;
+
+		public Unit(UnitType unitType, ArmyCategory parentArmyCat) : this(unitType, unitType.MinSize, parentArmyCat) { }
+
 		public Unit(UnitType unitType, int startSize, ArmyCategory parentArmyCat)
-		{
+		{
 			Category = parentArmyCat;
 			type = unitType;
 			Size = startSize;
@@ -151,10 +151,10 @@
 		}
 
 		public ArmyCategory Category
-		{
-			get
-			{
-				return cat;
+		{
+			get
+			{
+				return cat;
 			}
 			set { cat = value; }
 		}