# HG changeset patch # User IBBoard # Date 1292271600 0 # Node ID 08a9c960e17fea08c1dd24d4acf5fdf011a48bc3 # Parent 40362a9adf20cc0293f913d16195fac67176fe64 Fixes #97: Default army size * Merge default army size branch with trunk code * Fix issues with UTF-8 encoding and new line characters diff -r 40362a9adf20 -r 08a9c960e17f IBBoard.WarFoundry.API.csproj --- a/IBBoard.WarFoundry.API.csproj Sat Oct 30 14:28:44 2010 +0000 +++ b/IBBoard.WarFoundry.API.csproj Mon Dec 13 20:20:00 2010 +0000 @@ -60,7 +60,6 @@ --> - diff -r 40362a9adf20 -r 08a9c960e17f api/Exporters/WarFoundryHtmlExporter.cs --- a/api/Exporters/WarFoundryHtmlExporter.cs Sat Oct 30 14:28:44 2010 +0000 +++ b/api/Exporters/WarFoundryHtmlExporter.cs Mon Dec 13 20:20:00 2010 +0000 @@ -57,7 +57,7 @@ metaCharset.SetAttribute("content", "text/html;charset=UTF-8"); head.AppendChild(metaCharset); XmlElement style = doc.CreateElement("style"); - style.InnerText = "able, th, td { border: 1px solid #000; border-spacing: 0; border-collapse: collapse; margin: 0 }\n" + style.InnerText = "table, th, td { border: 1px solid #000; border-spacing: 0; border-collapse: collapse; margin: 0 }\n" +"table table { width: 100%; border-width: 0; margin: -2px }\n" +"table table td { border-width:0 1px }"; head.AppendChild(style); diff -r 40362a9adf20 -r 08a9c960e17f api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs --- a/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Sat Oct 30 14:28:44 2010 +0000 +++ b/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Mon Dec 13 20:20:00 2010 +0000 @@ -40,6 +40,8 @@ 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; StoreExtraData(system, elem); return system; } diff -r 40362a9adf20 -r 08a9c960e17f api/Factories/Xml/WarFoundryXmlRaceFactory.cs Binary file api/Factories/Xml/WarFoundryXmlRaceFactory.cs has changed diff -r 40362a9adf20 -r 08a9c960e17f api/Objects/GameSystem.cs --- a/api/Objects/GameSystem.cs Sat Oct 30 14:28:44 2010 +0000 +++ b/api/Objects/GameSystem.cs Mon Dec 13 20:20:00 2010 +0000 @@ -17,16 +17,34 @@ /// public class GameSystem : WarFoundryStagedLoadingObject { - private bool warnOnError; + private static int SYSTEM_DEFAULT_ARMY_SIZE = 1000; + private bool warnOnError; private bool allowAllies; private Dictionary categories = new Dictionary(); private Dictionary stats = new Dictionary(); private string defaultStats; + private int defaultArmySize; public GameSystem(string systemID, string systemName, IWarFoundryFactory creatingFactory) : base(systemID, systemName, creatingFactory) { stats = new Dictionary(); } + + public int SystemArmyDefaultSize + { + get { return defaultArmySize; } + set + { + if (value == 0) + { + defaultArmySize = SYSTEM_DEFAULT_ARMY_SIZE; + } + else + { + defaultArmySize = value; + } + } + } public bool AllowAllies { diff -r 40362a9adf20 -r 08a9c960e17f schemas/system.xsd --- a/schemas/system.xsd Sat Oct 30 14:28:44 2010 +0000 +++ b/schemas/system.xsd Mon Dec 13 20:20:00 2010 +0000 @@ -39,6 +39,7 @@ +