diff API/Objects/Requirement/RequiresAtLeastNUnitsRequirement.cs @ 419:71fceea2725b

Code tidy-up - remove warnings * Add missing GetHashcode() implementations * Remove unused exception variables * Use unused event * Remove dead code * Properly override some methods
author IBBoard <dev@ibboard.co.uk>
date Sun, 25 Sep 2011 20:52:27 +0100
parents 0dd8dbe8afe9
children 3882b533d99d
line wrap: on
line diff
--- a/API/Objects/Requirement/RequiresAtLeastNUnitsRequirement.cs	Sat Sep 24 11:59:39 2011 +0100
+++ b/API/Objects/Requirement/RequiresAtLeastNUnitsRequirement.cs	Sun Sep 25 20:52:27 2011 +0100
@@ -39,6 +39,18 @@
 			}
 		}
 
+		public override int GetHashCode()
+		{
+			int hash = 0;
+
+			foreach (UnitCountRequirementData req in requiredTypes)
+			{
+				hash += req.UnitType.GetHashCode();
+			}
+
+			return hash;
+		}
+
 		/// <summary>
 		/// Checks whether the supplied WarFoundryObject can be added to the supplied army.
 		/// </summary>