Mercurial > repos > IBDev-IBBoard.WarFoundry.API
comparison api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs @ 390:4e0031339bcb default-army-name
Re #97: Default army size papercut.
Updated GameSystem.cs, system.xsd and Factories to accommodate default system size.
author | snowblizz |
---|---|
date | Sun, 12 Dec 2010 15:27:07 +0000 |
parents | c1caf467dd40 |
children |
comparison
equal
deleted
inserted
replaced
389:121d9d1ba53c | 390:4e0031339bcb |
---|---|
37 | 37 |
38 public GameSystem CreateSystemFromElement(ZipFile file, XmlElement elem) | 38 public GameSystem CreateSystemFromElement(ZipFile file, XmlElement elem) |
39 { | 39 { |
40 string id = elem.GetAttribute("id"); | 40 string id = elem.GetAttribute("id"); |
41 string name = elem.GetAttribute("name"); | 41 string name = elem.GetAttribute("name"); |
42 GameSystem system = new GameSystem(id, name, mainFactory); | 42 GameSystem system = new GameSystem(id, name, mainFactory); |
43 int defaultarmysize = XmlTools.GetIntValueFromAttribute(elem,"defaultArmySize"); | |
44 system.SystemArmyDefaultSize = defaultarmysize; | |
43 StoreExtraData(system, elem); | 45 StoreExtraData(system, elem); |
44 return system; | 46 return system; |
47 | |
45 } | 48 } |
46 | 49 |
47 public void CompleteLoading(GameSystem system) | 50 public void CompleteLoading(GameSystem system) |
48 { | 51 { |
49 if (!WarFoundryXmlFactoryUtils.CanCompleteLoading(system)) | 52 if (!WarFoundryXmlFactoryUtils.CanCompleteLoading(system)) |
50 { | 53 { |
51 return; | 54 return; |
52 } | 55 } |
53 | 56 |