diff api/Objects/SystemStats.cs @ 181:8c6f55d289b0

Fixes #200: Stats names should be case-insensitive * ToLower() all stat names/IDs so that they are case-insensitive
author IBBoard <dev@ibboard.co.uk>
date Sat, 24 Oct 2009 15:18:00 +0000
parents 2f3cafb69799
children f8f441f2fcfe
line wrap: on
line diff
--- a/api/Objects/SystemStats.cs	Sat Oct 24 15:16:35 2009 +0000
+++ b/api/Objects/SystemStats.cs	Sat Oct 24 15:18:00 2009 +0000
@@ -27,7 +27,7 @@
 		{
 			StatSlot slot = new StatSlot(slotName);
 			slot.SystemStats = this;
-			statsByName[slot.Name] = slot;
+			statsByName[slot.Name.ToLower()] = slot;
 			stats.Add(slot);
 		}		
 
@@ -43,7 +43,7 @@
 		{
 			get 
 			{
-				return DictionaryUtils.GetValue(statsByName, statName);
+				return DictionaryUtils.GetValue(statsByName, statName.ToLower());
 			}
 		}