Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff api/Objects/SystemStats.cs @ 295:f8f441f2fcfe
Re #323: WarFoundry.API - SystemStats cannot remove stat
Update SystemStats
Implement RemoveStatSlot
author | Tsudico |
---|---|
date | Sat, 18 Dec 2010 20:53:52 +0000 |
parents | 8c6f55d289b0 |
children | ed5e6d92ecd9 |
line wrap: on
line diff
--- 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; }