# HG changeset patch # User IBBoard # Date 1298234208 0 # Node ID f7c3c1b39726bcfd010d0451210434dd9f8818ab # Parent 7e1b27843b0d09f5ed800d5720eb64415cae5deb Re #99: Define "points" values in GameSystem * Inline some local variables for readability * Define defaults in schema no-open-ticket diff -r 7e1b27843b0d -r f7c3c1b39726 api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs --- a/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Sun Feb 20 16:00:11 2011 +0000 +++ b/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Sun Feb 20 20:36:48 2011 +0000 @@ -40,16 +40,11 @@ string id = elem.GetAttribute("id"); string name = elem.GetAttribute("name"); GameSystem system = new GameSystem(id, name, mainFactory); - int defaultarmysize = XmlTools.GetIntValueFromAttribute(elem, "defaultArmySize"); - system.SystemArmyDefaultSize = defaultarmysize; - string defaultptsabbreviationsing = elem.GetAttribute("defaultPtsAbbreviationSingular"); - system.SystemPtsAbbrevSingle = defaultptsabbreviationsing; - string defaultPtsabbreviationplur = elem.GetAttribute("defaultPtsAbbreviationPlural"); - system.SystemPtsAbbrevPlural = defaultPtsabbreviationplur; - string defaultPtsnamesing = elem.GetAttribute("defaultPtsNameSingular"); - system.SystemPtsNameSingle = defaultPtsnamesing; - string defaultPtsnameplur = elem.GetAttribute("defaultPtsNamePlural"); - system.SystemPtsNamePlural = defaultPtsnameplur; + system.SystemArmyDefaultSize = XmlTools.GetIntValueFromAttribute (elem, "defaultArmySize"); + system.SystemPtsAbbrevSingle = elem.GetAttribute ("defaultPtsAbbreviationSingular"); + system.SystemPtsAbbrevPlural = elem.GetAttribute ("defaultPtsAbbreviationPlural"); + system.SystemPtsNameSingle = elem.GetAttribute ("defaultPtsNameSingular"); + system.SystemPtsNamePlural = elem.GetAttribute ("defaultPtsNamePlural"); StoreExtraData(system, elem); return system; } diff -r 7e1b27843b0d -r f7c3c1b39726 schemas/system.xsd --- a/schemas/system.xsd Sun Feb 20 16:00:11 2011 +0000 +++ b/schemas/system.xsd Sun Feb 20 20:36:48 2011 +0000 @@ -40,10 +40,10 @@ - - - - + + + +