Mercurial > repos > IBBoard.WarFoundry.API
diff api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs @ 67:e6200220ece3
Re #50 - Complete core loading of WarFoundry XML files
* Clean up stat loading for game systems and unit types
* Delete rogue character that stopped code compiling
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 25 Apr 2009 14:59:23 +0000 |
parents | 1b35eed503ef |
children | 2f3cafb69799 |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Sat Apr 11 14:53:45 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Sat Apr 25 14:59:23 2009 +0000 @@ -86,15 +86,14 @@ private SystemStats CreateSystemStatsFromElement(XmlElement elem) { - List<StatSlot> slots = new List<StatSlot>(); - string id = elem.GetAttribute("id"); + SystemStats sysStats = new SystemStats(elem.GetAttribute("id")); foreach (XmlElement slot in WarFoundryXmlFactoryUtils.SelectNodes(elem, "system:sysStat")) { - StatSlot statSlot = new StatSlot(slot.GetAttribute("name")); - slots.Add(statSlot); + sysStats.AddStatSlot(slot.GetAttribute("name")); } - - return new SystemStats(id, slots.ToArray()); - } } + + return sysStats; + } + } }