# HG changeset patch # User Tsudico # Date 1292705632 0 # Node ID f8f441f2fcfea16baa71dee6259da4c81fb0d96c # Parent 52985d48b2637f16aebc9c744c679385f6b33d95 Re #323: WarFoundry.API - SystemStats cannot remove stat Update SystemStats Implement RemoveStatSlot diff -r 52985d48b263 -r f8f441f2fcfe api/Objects/SystemStats.cs --- a/api/Objects/SystemStats.cs Fri Dec 17 20:40:30 2010 +0000 +++ b/api/Objects/SystemStats.cs Sat Dec 18 20:53:52 2010 +0000 @@ -52,6 +52,14 @@ return stats.IndexOf(slot); } + public void RemoveStatSlot(string name) + { + statsByName.Remove(name); + StatSlot slot = new StatSlot(name); + slot.SystemStats = this; + stats.Remove(slot); + } + public int SlotCount { get { return stats.Count; }