diff api/Objects/Stats.cs @ 81:032b174fc17a

Re #10 - Refactoring for readability * Remove "trainwreck code" by making Unit and UnitType publish methods to get arrays of stats * Remove "trainwreck code" by making Unit, UnitType and Stats publish methods to get value of one stat * Make factory use new methods
author IBBoard <dev@ibboard.co.uk>
date Wed, 27 May 2009 19:43:09 +0000
parents 10d14a7051d5
children 2f3cafb69799
line wrap: on
line diff
--- a/api/Objects/Stats.cs	Tue May 19 19:00:48 2009 +0000
+++ b/api/Objects/Stats.cs	Wed May 27 19:43:09 2009 +0000
@@ -83,6 +83,11 @@
 				}
 			}
 		}
+
+		public string GetStatValue(string id)
+		{
+			return this[id].SlotValueString;
+		}
 		
 		public int StatCount
 		{